/** * Initialize static instance */ private static function init() { require_once dirname(__FILE__) . '/../Client/Client.php'; // Additional configuration options can be used here $config = new WurflCloud_Client_Config(); $config->api_key = self::$api_key; // These two lines setup the WurflCloud_Client and do the device detection self::$instance = new WurflCloud_Client_Client($config); self::$instance->detectDevice(); }
/** * Initialize static instance */ private static function init() { require_once dirname(__FILE__) . '/../Client/Client.php'; // Additional configuration options can be used here $config = new WurflCloud_Client_Config(); $config->api_key = self::$api_key; // Set the cache that you'd like to use. Here are some options: $cache = new WurflCloud_Cache_Cookie(); //$cache = new WurflCloud_Cache_APC(); //$cache = new WurflCloud_Cache_Memcache(); //$cache = new WurflCloud_Cache_Memcached(); //$cache = new WurflCloud_Cache_File(); // These two lines setup the WurflCloud_Client and do the device detection self::$instance = new WurflCloud_Client_Client($config, $cache); self::$instance->detectDevice(); }