當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Storage::factory方法代碼示例

本文整理匯總了PHP中Storage::factory方法的典型用法代碼示例。如果您正苦於以下問題:PHP Storage::factory方法的具體用法?PHP Storage::factory怎麽用?PHP Storage::factory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Storage的用法示例。


在下文中一共展示了Storage::factory方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _auth

 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);
 }
開發者ID:wtnabe,項目名稱:ga-shikomi-php,代碼行數:9,代碼來源:api.php

示例2: __construct

 /**
  * 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']]);
 }
開發者ID:stensi,項目名稱:Kohana-B8,代碼行數:19,代碼來源:core.php

示例3: session_storage

 /**
  * 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');
 }
開發者ID:lenninsanchez,項目名稱:donadores,代碼行數:10,代碼來源:Session.php


注:本文中的Storage::factory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。