本文整理汇总了PHP中Api::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Api::__construct方法的具体用法?PHP Api::__construct怎么用?PHP Api::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Api
的用法示例。
在下文中一共展示了Api::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->paper_id = intval($this->data['paper_id']);
$this->type = t($this->data['type']);
$this->sysdao = M('sys_ana_test');
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->paper_id = intval($this->data['paper_id']);
$this->num = intval($this->data['num']);
$this->articledao = M('ssat_article');
}
示例3: __construct
public function __construct()
{
parent::__construct();
// 获取关键字
$this->keyword = t($this->data['keyword']);
$this->type = $this->data['type'] ? intval($this->data['type']) : 1;
// 分页数
$page = intval($this->data['page']);
$page <= 0 && ($page = 1);
// 分页大小
$pageSize = 10;
// 使用sphinx进行搜索功能
$sphinx = new SphinxClient();
// 配置sphinx服务器信息
$sphinx->SetServer(self::SPHINX_HOST, self::SPHINX_PORT);
// 配置返回结果集
$sphinx->SetArrayResult(true);
// 匹配结果偏移量
$sphinx->SetLimits(($page - 1) * $pageSize, $pageSize, 1000);
// 设置最大搜索时间
$sphinx->SetMaxQueryTime(3);
// 设置搜索模式
$sphinx->setMatchMode(SPH_MATCH_PHRASE);
$this->sphinx = $sphinx;
}
示例4:
/**
* Constructor
*/
function __construct()
{
parent::__construct();
$this->EE->load->model('template_model');
// initialize the reserved names array
$this->_load_reserved_groups();
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->paper_id = intval($this->data['paper_id']);
$this->paper_section = intval($this->data['paper_section']);
$this->article_id = intval($this->data['article_id']);
}
示例6: __construct
/**
* Object constructor.
*/
public function __construct($host, $shop_id, $shop_pass, $site_id, $site_pass, $params = array())
{
$params['shop_id'] = $shop_id;
$params['shop_pass'] = $shop_pass;
$params['site_id'] = $site_id;
$params['site_pass'] = $site_pass;
parent::__construct($host, $params);
}
示例7: __construct
/**
* Site api constructor.
*/
public function __construct($host, $site_id, $site_pass, $params = array())
{
if (!is_array($params)) {
$params = array();
}
$params['site_id'] = $site_id;
$params['site_pass'] = $site_pass;
parent::__construct($host, $params);
}
示例8: __construct
public function __construct()
{
parent::__construct();
$api = t($_REQUEST['api']);
!$api['api'] && ($api = $this->api_list[0]);
if (!in_array($api, $this->api_list)) {
$return = array('code' => '00502', 'message' => '非法请求了哦');
exit(json_encode($return));
}
}
示例9: __construct
/**
* Constructor.
*
* @param CentralAuthenticationStore $cas Shared instance of the CentralAuthenticationStore class.
* @param LoggerInterface $logger Shared instance of a Logger class.
* @param Curl $curl Shared instance of the Curl class.
* @param RequestInterface $request Shared instance of a Request class.
*/
public function __construct($cas, $logger, $curl, $request)
{
parent::__construct($cas, $logger, $curl);
$this->state = $request->get_get_data('state');
$this->code = $request->get_get_data('code');
$this->redirect_uri = $request->base_url . $request->call;
$this->scope = NULL;
$this->token_expires = 0;
if ($this->state === NULL) {
$this->state = md5(uniqid(rand(), TRUE));
}
}
示例10: __construct
public function __construct($client, array $options = array())
{
parent::__construct($client);
$this->reset();
$this->set($options);
}
示例11: __construct
public function __construct($key = null)
{
parent::__construct();
}
示例12: ImagenesController
function __construct($request)
{
parent::__construct($request);
$this->controller = new ImagenesController();
}
示例13: ee
/**
* Constructor
*
*/
function __construct()
{
parent::__construct();
ee()->load->model('channel_entries_model');
}
示例14: __construct
/**
* Constructor
*
*/
public function __construct($configFile = null)
{
// Get the function-name for the jsonp callback
$this->jsonPcallback = self::getJsonpCallback();
// Set debug mode = true
parent::__construct($configFile, true);
}
示例15: Facebook
function __construct()
{
parent::__construct();
require 'facebook/facebook.php';
$this->facebook = new Facebook(array('appId' => '368457244245', 'secret' => '1cbfe5aefa98de84245e0aebbbcb75cb'));
}