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


PHP Twitter::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($config)
 {
     parent::setVariables($config);
     $this->callback_getdata = array(array($this, 'oauthRequest'), array('search', array('q' => $config['terms'], 'rpp' => $config['total'], 'result_type' => 'recent'), "http://search.twitter.com/"));
     $this->setURL('http://search.twitter.com/' . $config['terms'] . '/' . $config['total']);
     $this->setItemTemplate('<li class="clearfix"><span class="image"><a href="{{{user_link}}}"><img width="48" src="{{{user_image}}}" alt="{{{user_nickname}}}" /></a></span>{{{text}}}<p class="date"><a href="{{{link}}}">{{{date}}}</a></p></li>' . "\n");
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     parent::__construct($config);
 }
開發者ID:remiprev,項目名稱:pubwich,代碼行數:9,代碼來源:Twitter.php

示例2: __construct

 public function __construct($config)
 {
     parent::setVariables($config);
     $this->setURL(sprintf('http://' . $this->auth . 'search.twitter.com/search.json?q=%s&rpp=%d', $config['terms'], $config['total']));
     $this->setItemTemplate('<li class="clearfix"><span class="image"><a href="{%user_link%}"><img width="48" src="{%user_image%}" alt="{%user_nickname%}" /></a></span>{%text%}<p class="date"><a href="{%link%}">{%date%}</a></p></li>' . "\n");
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     $this->callback_function = array(Pubwich, 'json_decode');
     parent::__construct($config);
 }
開發者ID:pcdinh,項目名稱:pubwich,代碼行數:9,代碼來源:Twitter.php

示例3: __construct

 public function __construct()
 {
     $ci =& get_instance();
     $ci->load->config('twitter', TRUE);
     $consumerKey = $ci->config->item('consumer_key', 'twitter');
     $consumerSec = $ci->config->item('consumer_secret', 'twitter');
     $accesstok = $ci->config->item('access_token', 'twitter');
     $accesstoksec = $ci->config->item('access_token_secret', 'twitter');
     parent::__construct($consumerKey, $consumerSec, $accesstok, $accesstoksec);
 }
開發者ID:iplayfast,項目名稱:sc,代碼行數:10,代碼來源:twitterlib.php

示例4: __construct

 public function __construct($config)
 {
     parent::setVariables($config);
     $this->setURL(sprintf('http://' . $this->auth . 'search.twitter.com/search.json?q=%s&rpp=%d', $config['terms'], $config['total']));
     $this->setItemTemplate('<li class="clearfix"><span class="image"><a href="{%user_link%}"><img width="48" src="{%user_image%}" alt="{%user_nickname%}" /></a></span>{%text%}<p class="date"><a href="{%link%}">{%date%}</a></p></li>' . "\n");
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     if (!function_exists('json_decode')) {
         // only include the zend_json library if php json support is not enabled (php < 5.2)
         require_once dirname(__FILE__) . '/../Zend/Json.php';
     }
     $this->callback_function = array(Pubwich, 'json_decode');
     parent::__construct($config);
 }
開發者ID:j15e,項目名稱:pubwich,代碼行數:13,代碼來源:Twitter.php

示例5: __construct

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

示例6: __construct

 /**
  * Constructor; sets up configuration.
  * 
  * @param string $user Laconica user name; null for limited read-only access
  * @param string $pass Laconica password; null for limited read-only access
  * @param string $baseUrl Base URL of Laconica install. Defaults to identi.ca
  */
 public function __construct($user = null, $pass = null, $baseUrl = 'http://identi.ca/')
 {
     $this->baseUrl = $baseUrl;
     parent::__construct($user, $pass);
 }
開發者ID:Grasia,項目名稱:bolotweet,代碼行數:12,代碼來源:laconica.class.php

示例7: __construct

 /**
  * Setup Twitter client connection details
  *
  * Ensure you set a user agent, whether via the constructor or by assigning a value to the property directly.
  * Also, if you are not running this from the Eastern timezone, be sure to set your proper timezone.
  *
  * @access public
  * @since 2.0
  * @return Twitter_Friends
  */
 public function __construct($username = null, $password = null, $user_agent = null, $headers = null, $timezone = 'America/New_York')
 {
     parent::__construct($username, $password, $user_agent, $headers, $timezone);
 }
開發者ID:jezrielbajan,項目名稱:php-twitter,代碼行數:14,代碼來源:class.friends.php

示例8: __construct

 public function __construct($config)
 {
     parent::setVariables($config);
     $this->callback_getdata = array(array($this, 'oauthRequest'), array('search/tweets', array('q' => $config['terms'], 'count' => $config['total'], 'result_type' => 'recent')));
     $this->setURL('http://search.twitter.com/' . $config['terms'] . '/' . $config['total']);
     // for cache hash
     $this->setItemTemplate('<li><a href="{{{user_link}}}"><img class="item-media-thumbnail" width="48" height="48" src="{{{user_image}}}" alt="" /> <strong>@{{{user_nickname}}}</strong></a>: {{{status}}} (<a href="{{{link}}}">{{{date}}}</a>)</li>' . PHP_EOL);
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     parent::__construct($config);
 }
開發者ID:msqueeg,項目名稱:PubwichFork,代碼行數:10,代碼來源:Twitter.php

示例9: Twitter

 /**
  * Constructor
  *
  * @access	public
  */
 function Twitter()
 {
     // Adding an old-style constructor allows use on older installs of EE2.
     Twitter::__construct();
 }
開發者ID:kentonquatman,項目名稱:iofa,代碼行數:10,代碼來源:mod.twitter.php


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