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


PHP tmhOAuth::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($consumerKeys)
 {
     $this->consumerKeys = $consumerKeys;
     parent::__construct($consumerKeys);
     if (session_status() == PHP_SESSION_NONE) {
         session_start();
     }
 }
開發者ID:danieltrolezi,項目名稱:twitter-oauth,代碼行數:8,代碼來源:Twitter.php

示例2: __construct

 public function __construct($config = array())
 {
     $this->config = array_merge(array('consumer_key' => 'AHbD6KOwFcUp57JJ8ofTw', 'consumer_secret' => 'lxwPpSvedHIEQpevtPChGPuZk4awsVWECx5wUwE3R4', 'token' => 'A_USER_TOKEN', 'secret' => 'A_USER_SECRET', 'bearer' => 'YOUR_OAUTH2_TOKEN', 'user_agent' => 'tmhOAuth ' . parent::VERSION . ' Examples 0.1'), $config);
     if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'tmh_myconfig.php')) {
         include __DIR__ . DIRECTORY_SEPARATOR . 'tmh_myconfig.php';
         $this->config = array_merge($this->config, tmh_myconfig());
     }
     parent::__construct($this->config);
 }
開發者ID:nickdenardis,項目名稱:social-wayne,代碼行數:9,代碼來源:twitteroauth.php

示例3: __construct

 public function __construct($config = array())
 {
     global $twitter_oauth;
     //dan edit
     $this->config = array_merge(array('consumer_key' => $twitter_oauth["consumer_key"], 'consumer_secret' => $twitter_oauth["consumer_secret"], 'token' => $twitter_oauth["token"], 'secret' => $twitter_oauth["secret"], 'bearer' => 'XXXXXXXXXXXX', 'user_agent' => 'tmhOAuth ' . parent::VERSION . ' Examples 0.1'), $config);
     if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'tmh_myconfig.php')) {
         include __DIR__ . DIRECTORY_SEPARATOR . 'tmh_myconfig.php';
         $this->config = array_merge($this->config, tmh_myconfig());
     }
     parent::__construct($this->config);
 }
開發者ID:OndroNR,項目名稱:bitcoin-hal10k,代碼行數:11,代碼來源:tmhOAuthExample.php

示例4: __construct

 /**
  * Twitter constructor.
  *
  * @param Config       $config
  * @param SessionStore $session
  */
 public function __construct(Config $config, SessionStore $session)
 {
     $this->tconfig = Settings::get('ttwitter');
     $client_id = Settings::get('services.twitter.client_id');
     $client_secret = Settings::get('services.twitter.client_secret');
     $this->tconfig['CONSUMER_KEY'] = isset($client_id) && !empty($client_id) ? $client_id : $this->tconfig['CONSUMER_KEY'];
     $this->tconfig['CONSUMER_SECRET'] = isset($client_secret) && !empty($client_secret) ? $client_secret : $this->tconfig['CONSUMER_SECRET'];
     if (empty($this->tconfig)) {
         throw new Exception('No config found');
     }
     $this->debug = isset($this->tconfig['debug']) && $this->tconfig['debug'] ? true : false;
     $this->parent_config = ['consumer_key' => $this->tconfig['CONSUMER_KEY'], 'consumer_secret' => $this->tconfig['CONSUMER_SECRET'], 'token' => $this->tconfig['ACCESS_TOKEN'], 'secret' => $this->tconfig['ACCESS_TOKEN_SECRET']];
     if ($session->has('access_token')) {
         $access_token = $session->get('access_token');
         if (is_array($access_token) && isset($access_token['oauth_token']) && isset($access_token['oauth_token_secret']) && !empty($access_token['oauth_token']) && !empty($access_token['oauth_token_secret'])) {
             $this->parent_config['token'] = $access_token['oauth_token'];
             $this->parent_config['secret'] = $access_token['oauth_token_secret'];
         }
     }
     $this->parent_config['use_ssl'] = $this->tconfig['USE_SSL'];
     $this->parent_config['user_agent'] = 'LTTW ' . parent::VERSION;
     parent::__construct($this->parent_config);
 }
開發者ID:cvepdb-cms,項目名稱:module-posts,代碼行數:29,代碼來源:Twitter.php

示例5: __construct

 public function __construct($config = array())
 {
     $this->config = array_merge(array('consumer_key' => module_config::c('social_twitter_api_key', ''), 'consumer_secret' => module_config::c('social_twitter_api_secret', ''), 'user_agent' => 'UCM Twitter 0.1'), $config);
     parent::__construct($this->config);
 }
開發者ID:sgh1986915,項目名稱:php-crm,代碼行數:5,代碼來源:twitter_account_connect.php

示例6: __construct

 public function __construct(array $config, $code)
 {
     parent::__construct($config);
     $this->code = $code;
 }
開發者ID:mp-php,項目名稱:fuel-packages-twitter,代碼行數:5,代碼來源:twitter_Test.php


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