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