本文整理汇总了PHP中core\Controller::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::__construct方法的具体用法?PHP Controller::__construct怎么用?PHP Controller::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core\Controller
的用法示例。
在下文中一共展示了Controller::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->_files = $this->loadModel('model_files');
$this->_user = $this->loadModel('model_user');
$this->checkCookie();
}
示例2:
function __construct()
{
parent::__construct();
if (!$this->uid) {
$this->redirect('/?m=member&c=login');
}
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->loadModel('messageModel');
$this->loadModel('pageModel');
$this->loadModel('slideModel');
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->locale->load('Welcome');
// Model can be initialized in constructur
// $this->model = new \Modules\Test\Models\SampleModelInModule();
}
示例5: __construct
public function __construct()
{
parent::__construct();
if ($this->uid) {
$this->redirect('/?');
}
}
示例6: __construct
public function __construct()
{
parent::__construct();
if (!Session::get('loggedin')) {
Url::redirect('login');
}
}
示例7: __construct
public function __construct()
{
parent::__construct();
$this->audit = new \Models\Audit();
$this->users = new \Models\Users();
$this->keys = new \Models\Keys();
}
示例8: __construct
public function __construct()
{
// Normally construct the application controller
parent::__construct();
// !!! Your module cunstructer here !!! //
/*
Module template option ('module_view_paths') When set to true, the template system will load
the pages view file from the the templates module view folder if it exists:
( template_path/module_views/module_name/viewname.php )
If it doesnt exist, then it loads the default module view file:
( modules/module_name/views/viewname.php )
If set to false, it will load the default view for the URI
( template_path/views/controller/viewname.php ) )
*/
$this->Template->config('module_view_paths', true);
/*
Example loading a module config file
First Param => 'Module Name',
Second Param => 'Config Array Name', ( !! Must be Unique! Cannot be 'Core', 'App', OR 'DB' !! )
Third Param => 'Config File Name',
Forth Param => 'Array Variable Name' ( !! ONLY IF config options are in an array !! )
*/
load_module_config('Devtest', 'mod_config', 'config.php', 'config_options');
// Usage
$this->Config = load_class('Config');
$this->Config->get('var_name', 'mod_config');
// OR
config('var_name', 'mod_config');
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper(array('view', 'tools'));
save_log_data();
}
示例10: __construct
/**
* Call the parent construct
*/
public function __construct()
{
parent::__construct();
$this->language->load('Welcome');
$this->_pages = new \Models\Pages();
$this->_welcomes = new \Models\Welcomes();
}
示例11:
function __construct()
{
parent::__construct();
if ($this->uid) {
$this->redirect('/?m=home');
}
}
示例12: __construct
/**
* Call the parent construct
*/
public function __construct()
{
parent::__construct();
$this->language->load('Welcome');
$this->users = new \Models\Users();
$this->userLogged();
}
示例13: __construct
/**
* Call the parent construct
*/
public function __construct()
{
parent::__construct();
$this->entradas = new \Models\Entradas();
$this->tags = new \Models\Tags();
$this->entradashastags = new \Models\Entradashastags();
}
示例14: __construct
/**
* Call the parent construct
*/
public function __construct()
{
parent::__construct();
$this->_pages = new \Models\Pages();
$this->_users = new \Models\Users();
$this->_welcomes = new \Models\Welcomes();
\Helpers\Security::require_login();
}
示例15: __construct
public function __construct()
{
parent::__construct();
$this->albumModel = new \Models\Album();
$this->status_model = new Status();
$this->mediaModel = new Media();
$this->categoryModel = new Category();
}