当前位置: 首页>>代码示例>>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;未经允许,请勿转载。