本文整理汇总了PHP中HomeController::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP HomeController::__construct方法的具体用法?PHP HomeController::__construct怎么用?PHP HomeController::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HomeController
的用法示例。
在下文中一共展示了HomeController::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function __construct()
{
parent::__construct();
$this->uid = is_login();
if (!$this->uid) {
$this->redirect('User/login');
}
}
示例2:
function __construct()
{
parent::__construct();
$this->uid = is_login();
if (!$this->uid && ACTION_NAME != 'callback') {
$this->redirect('User/login');
}
$this->pageTitle = "快捷支付";
}
示例3:
function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->model('user_model', 'users');
if ($this->session->userdata('admin') or $this->session->userdata('user')) {
$this->authen = true;
}
}
示例4:
function __construct()
{
parent::__construct();
$this->load->library('user_agent');
if ($this->agent->is_mobile() or $this->input->get('theme') === 'mobile') {
Theme::set_theme('mobile');
}
if ($this->data['mobile_state'] === 'yes') {
Theme::set_theme('mobile');
}
$this->data['noresult'] = '没有内容';
$this->load->library('contentfactory');
//分类
$this->config->load('cache_categories');
$this->cats = $this->config->item('categories');
//类型
$this->types = $this->config->item('types');
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->gangkou = D('Gangkou');
}
示例6: __construct
public function __construct()
{
parent::__construct();
}
示例7:
function __construct()
{
parent::__construct();
$this->uid = is_login();
$this->pageTitle = "我的钱包";
}
示例8:
function __construct()
{
parent::__construct();
$this->types = $this->config->item('types');
}
示例9: __construct
public function __construct($id, $module = null)
{
parent::__construct($id, $module);
$this->userModel = User::model();
}