Example #1
0
 /**
  * Initializes $apiConfig,
  * Php can't parse non-trivial expressions in data-members initializers, therefore a workaround is needed.
  * This method will be called to initialize $apiConfig with the default values.
  *
  * @static
  */
 static function init()
 {
     self::$apiConfig = array('use_objects' => true, 'application_name' => '', 'oauth2_client_id' => '', 'oauth2_client_secret' => '', 'oauth2_redirect_uri' => '', 'developer_key' => '', 'oauth_consumer_key' => 'anonymous', 'oauth_consumer_secret' => 'anonymous', 'site_name' => 'www.example.org', 'authClass' => 'GoogleApi\\Auth\\OAuth2', 'ioClass' => 'GoogleApi\\Io\\CurlIO', 'cacheClass' => 'GoogleApi\\Cache\\FileCache', 'oauth_test_token' => '', 'oauth_test_user' => '', 'basePath' => 'https://www.googleapis.com', 'ioFileCache_directory' => function_exists('sys_get_temp_dir') ? sys_get_temp_dir() . '/apiClient' : '/tmp/apiClient', 'ioMemCacheStorage_host' => '127.0.0.1', 'ioMemcacheStorage_port' => '11211', 'services' => array('analytics' => array('scope' => 'https://www.googleapis.com/auth/analytics.readonly'), 'calendar' => array('scope' => array("https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly")), 'books' => array('scope' => 'https://www.googleapis.com/auth/books'), 'latitude' => array('scope' => array('https://www.googleapis.com/auth/latitude.all.best', 'https://www.googleapis.com/auth/latitude.all.city')), 'moderator' => array('scope' => 'https://www.googleapis.com/auth/moderator'), 'oauth2' => array('scope' => array('https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email')), 'plus' => array('scope' => 'https://www.googleapis.com/auth/plus.me'), 'siteVerification' => array('scope' => 'https://www.googleapis.com/auth/siteverification'), 'tasks' => array('scope' => 'https://www.googleapis.com/auth/tasks'), 'urlshortener' => array('scope' => 'https://www.googleapis.com/auth/urlshortener')));
 }
Example #2
0
 public static function setAll(array $values)
 {
     self::$apiConfig = $values;
 }
Example #3
0
 static function setKey($key)
 {
     self::$API_KEY = $key;
 }