本文整理汇总了PHP中controller::controller方法的典型用法代码示例。如果您正苦于以下问题:PHP controller::controller方法的具体用法?PHP controller::controller怎么用?PHP controller::controller使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类controller
的用法示例。
在下文中一共展示了controller::controller方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
function __construct()
{
parent::controller();
parent::database();
parent::module('models', 'models_auth', 'culck');
header('Content-type: application/json');
}
示例2: EmailSettings
function EmailSettings()
{
parent::controller();
//Check For Admin Logged in
if (!isAdmin()) {
redirect_admin('login');
}
//Get Config Details From Db
$this->config->db_config_fetch();
//Debug Tool
//$this->output->enable_profiler=true;
// loading the lang files
$this->lang->load('admin/common', $this->config->item('language_code'));
$this->lang->load('admin/setting', $this->config->item('language_code'));
$this->lang->load('admin/validation', $this->config->item('language_code'));
//Load Models Common to all the functions in this controller
$this->load->model('common_model');
}
示例3: set
/**
* This method sets the Controller and run it.
* @param type $controller
* @return boolean
* @throws Exception
* @version 14.11.2014
*/
public static function set($controller = "")
{
if (empty($controller)) {
$controller = "index";
}
// For security purposes, we will add additional validation
// on user input.
if (!preg_match("/[-_0-9a-z]{2,15}/u", $controller)) {
throw new Exception(_("Controller parameter is not valid."));
}
// Take Controller name into the Configuration:
config::set("controller", $controller);
// If the script founds selected controller (must begin with "controller_":
if (!function_exists("controller_" . $controller)) {
throw new Exception(_("Controller is not found."));
}
self::$controller = $controller;
$ControllerName = "controller_" . $controller;
return $ControllerName();
}
示例4:
function __construct()
{
parent::controller();
}
示例5:
function __construct()
{
parent::controller();
$this->load->model('prefs_model');
}
示例6:
function __construct()
{
parent::controller();
$this->load->model('directory_model');
$this->load->library('Image_upload');
}
示例7:
function __construct()
{
parent::controller();
parent::module('helpers', 'functions_validate_helpers');
}
示例8:
function __construct()
{
parent::controller();
$this->load->helper('googlemaps');
}