本文整理匯總了PHP中Twitter::setVariables方法的典型用法代碼示例。如果您正苦於以下問題:PHP Twitter::setVariables方法的具體用法?PHP Twitter::setVariables怎麽用?PHP Twitter::setVariables使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Twitter
的用法示例。
在下文中一共展示了Twitter::setVariables方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
示例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);
}
示例3: __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);
}
示例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);
}