本文整理汇总了PHP中Google_Client::io方法的典型用法代码示例。如果您正苦于以下问题:PHP Google_Client::io方法的具体用法?PHP Google_Client::io怎么用?PHP Google_Client::io使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Google_Client
的用法示例。
在下文中一共展示了Google_Client::io方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($config = array())
{
global $apiConfig;
$apiConfig = array_merge($apiConfig, $config);
self::$cache = new $apiConfig['cacheClass']();
self::$auth = new $apiConfig['authClass']();
self::$io = new $apiConfig['ioClass']();
}
示例2: __construct
public function __construct($config = array())
{
global $apiConfig;
if (isset($apiConfig) && is_array($apiConfig)) {
$this->googleConfig = $apiConfig;
}
if (!isset($this->googleConfig['ioFileCache_directory'])) {
$this->googleConfig['ioFileCache_directory'] = function_exists('sys_get_temp_dir') ? sys_get_temp_dir() . '/Google_Client' : '/tmp/Google_Client';
}
$this->googleConfig = array_merge($this->googleConfig, $config);
$cache_object_type = $this->googleConfig['cacheClass'];
$auth_object_type = $this->googleConfig['authClass'];
$io_object_type = $this->googleConfig['ioClass'];
self::$cache = new $cache_object_type($this->googleConfig);
self::$auth = new $auth_object_type($this->googleConfig);
self::$io = new $io_object_type();
$GLOBALS['googleApiConfig'] = $this->googleConfig;
}