コード例 #1
0
ファイル: api.php プロジェクト: wtnabe/ga-shikomi-php
 function _auth()
 {
     $storage = Storage::factory($this->config);
     $this->client->setAuthConfig($storage->loadSecrets());
     $this->client->addScope(\Google_Service_Analytics::ANALYTICS, \Google_Service_Analytics::ANALYTICS_EDIT);
     $credential = $storage->loadCredential();
     $this->client->setAccessToken($credential);
     $this->client->setClientId(json_decode($credential)->client_id);
 }
コード例 #2
0
ファイル: core.php プロジェクト: stensi/Kohana-B8
 /**
  * Creates a new B8 object.
  *
  * @param   array  custom configuration
  * @return  void
  */
 public function __construct(array $config = array())
 {
     // Load the lexer default config file
     $this->config = Kohana::$config->load('b8');
     // Overwrite with custom config settings
     foreach ($config as $key => $value) {
         $this->config[$key] = $value;
     }
     // Setup lexer, passing config settings through in case of custom configuration
     $this->lexer = Lexer::factory($this->config['use_lexer'], $this->config['lexer'][$this->config['use_lexer']]);
     // Setup storage, passing config settings through in case of custom configuration
     $this->storage = Storage::factory($this->config['use_storage'], $this->config['storage'][$this->config['use_storage']]);
 }
コード例 #3
0
ファイル: Session.php プロジェクト: lenninsanchez/donadores
 /**
  * session_storage method chaining, e.g.,
  * - $session->session_storage()->method()
  *
  * @return \WebDriver\Storage
  */
 public function session_storage()
 {
     return Storage::factory('session', $this->url . '/session_storage');
 }