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


PHP Google_Client::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     // Set our settings
     $this->setApplicationName("WordPress SEO Premium");
     // Not sure if used
     $this->setClientId('887668307827-4jhsr06rntrt3g3ss2r72dblf3ca7msv.apps.googleusercontent.com');
     $this->setClientSecret('pPW5gLoTNtNHyiDH6YRn-CIB');
     $this->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
     $this->setScopes(array('https://www.google.com/webmasters/tools/feeds/'));
     // Let's get an access token if we've got a refresh token
     $refresh_token = $this->get_refresh_token();
     if ('' != $refresh_token) {
         // Refresh the token
         $response = $this->refreshToken($refresh_token);
         // Check response
         if ('' != $response) {
             $response = json_decode($response);
             // Check if there is an access_token
             if (isset($response->access_token)) {
                 // Set access_token
                 $this->setAccessToken($response->access_token);
             }
         }
     }
 }
開發者ID:rinodung,項目名稱:myfreetheme,代碼行數:26,代碼來源:class-gwt-google-client.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // Set our settings
     $this->setApplicationName('WordPress SEO by Yoast Premium');
     // Not sure if used
     $this->setClientId('972827778625-rvd2mfvj3fnc97es9p57vqaap2lucm3h.apps.googleusercontent.com');
     $this->setClientSecret('i32Z2SFYPdxNRALHf25uwMFW');
     $this->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
     $this->setScopes(array('https://www.google.com/webmasters/tools/feeds/'));
     // Let's get an access token if we've got a refresh token
     $refresh_token = $this->get_refresh_token();
     if ('' != $refresh_token) {
         try {
             // Refresh the token
             $response = $this->refreshToken($refresh_token);
             // Check response
             if ('' != $response) {
                 $response = json_decode($response);
                 // Check if there is an access_token
                 if (isset($response->access_token)) {
                     // Set access_token
                     $this->setAccessToken($response->access_token);
                 }
             }
         } catch (Exception $e) {
             delete_option('wpseo-premium-gwt');
             $this->save_refresh_token('');
         }
     }
 }
開發者ID:jmead,項目名稱:trucell-cms,代碼行數:31,代碼來源:class-gwt-google-client.php

示例3: __construct

 public function __construct($config = null)
 {
     parent::__construct($config);
     $this->_key = Config::get('ssoGoogleKey');
     $this->_secret = Config::get('ssoGoogleSecret');
     $this->setClientId($this->_key);
     $this->setClientSecret($this->_secret);
 }
開發者ID:nabble,項目名稱:ajde-core,代碼行數:8,代碼來源:Google.php

示例4: __construct

 public function __construct($config = null)
 {
     parent::__construct($config);
     $this->_key = config('services.google.key');
     $this->_secret = config('services.google.secret');
     $this->setClientId($this->_key);
     $this->setClientSecret($this->_secret);
 }
開發者ID:nabble,項目名稱:ajde,代碼行數:8,代碼來源:Google.php

示例5: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     if (empty(\GO::config()->googledrive_oauth2_client_id) || empty(\GO::config()->googledrive_oauth2_client_secret) || empty(\GO::config()->googledrive_simple_api_key)) {
         throw new \Exception("Google drive API client not setup. \$config['googledrive_oauth2_client_id'], \$config['googledrive_oauth2_client_secret'] and \$config['googledrive_simple_api_key'] must be set.");
     }
     $this->setApplicationName(\GO::config()->title);
     $this->setUseObjects(true);
     $this->setClientId(\GO::config()->googledrive_oauth2_client_id);
     $this->setClientSecret(\GO::config()->googledrive_oauth2_client_secret);
     //		$this->setDeveloperKey(\GO::config()->googledrive_simple_api_key);
 }
開發者ID:ajaboa,項目名稱:crmpuan,代碼行數:12,代碼來源:Client.php

示例6: implode

 /**
  * Constructor for the class. We call the parent constructor, set
  * scopes array and service calendar instance that we will use
  */
 function __construct()
 {
     parent::__construct();
     /**
      * Google calendar service may have the options:
      * Google_Service_Calendar::CALENDAR_READONLY
      * if you want read only access
      * or
      * Google_Service_Calendar::CALENDAR
      * if you want read/write access to the calendar
      */
     $this->_scopes = implode(' ', array(\Google_Service_Calendar::CALENDAR));
     $this->_google_service_calendar = new \Google_Service_Calendar($this);
 }
開發者ID:bpineda,項目名稱:google-calendar-connect-class,代碼行數:18,代碼來源:GoogleCalendarClient.php

示例7: __construct

 /**
  * Class constructor
  *
  * @param \Illuminate\Session\SessionManager $session
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->setApplicationName(Config::get('services.google_oauth.app_name'));
     $this->setAccessType(Config::get('services.google_oauth.access_type'));
     $this->setClientId(Config::get('services.google_oauth.client_id'));
     $this->setClientSecret(Config::get('services.google_oauth.client_secret'));
     // http://stackoverflow.com/questions/21020898/403-error-with-messageaccess-not-configured-please-use-google-developers-conso
     // $this->setDeveloperKey(Config::get('google::api.api_key'));
     $this->setScopes(Config::get('services.google_oauth.scope'));
     $url = url(Config::get('services.google_oauth.redirect'));
     $this->setRedirectUri($url);
     if ($access_token = Session::get('google.access_token')) {
         $this->setAccessToken($access_token);
     }
 }
開發者ID:frengky,項目名稱:sociavel,代碼行數:22,代碼來源:GoogleClient.php

示例8: __construct

 /**
  * Constructor.
  *
  * @param array $config
  */
 public function __construct(array $config)
 {
     //        $gc = new \Google_Config();
     //        $gc->setApplicationName($config['application_name']);
     //        $gc->setClientId($config['client_id']);
     //        $gc->setClientSecret($config['client_secret']);
     //        $gc->setRedirectUri($config['redirect_uri']);
     //        $gc->setDeveloperKey($config['developer_key']);
     //        parent::__construct($gc);
     //        $gc = new \Google_Config();
     //        $gc->setApplicationName('delta-compass-88413');
     //        $gc->setClientId('325619265545-s52p0vqjttcmcbp4p5s70q2mbi2si9dt.apps.googleusercontent.com');
     //        $gc->setClientSecret('F6P1m7Hj4q821Gu_hfQzjV-n');
     //        $gc->setRedirectUri($config['redirect_uri']);
     //        $gc->setDeveloperKey($config['developer_key']);
     //        parent::__construct($gc);
     parent::__construct();
 }
開發者ID:ekyna,項目名稱:GoogleBundle,代碼行數:23,代碼來源:GoogleClient.php

示例9: array

 function __construct($params = array())
 {
     parent::__construct();
 }
開發者ID:shibubhat,項目名稱:shiburepo,代碼行數:4,代碼來源:google.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
 }
開發者ID:andrewkrug,項目名稱:repucaution,代碼行數:4,代碼來源:ga_client.php


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