\FGA
Implements fucking great advices interface
Synopsis
class FGA
{
- // constants
- const URL_ADVICE = 'http://ubilling.net.ua/fga/api/random/';
- const ROUTE_LANG = '?lang=';
- const ADVICE_KEY = 'FGADVICE';
- // members
- protected $cache = '';
- protected integer $responseTimeout = 1;
- protected integer $cacheTimeout = 86400;
- protected $adviceApi = '';
- protected string $currentLocale = '';
- // methods
- public void __construct()
- protected void setLocale()
- protected void initAdviceApi()
- protected void initCache()
- public string getRandomAdvice()
- public string getAdviceOfTheDay()
Constants
Name | Value |
---|---|
URL_ADVICE | 'http://ubilling.net.ua/fga/api/random/' |
ROUTE_LANG | '?lang=' |
ADVICE_KEY | 'FGADVICE' |
Members
protected
Methods
protected
- initAdviceApi() — Inits remote advice API handler
- initCache() — Inits Ubilling caching engine
- setLocale() — Sets current instance locale
public
- __construct() — Creates new awesome advices instance
- getAdviceOfTheDay() — Returns advice of the day
- getRandomAdvice() — Returns a random advice