本文整理匯總了PHP中Base_model::_inited方法的典型用法代碼示例。如果您正苦於以下問題:PHP Base_model::_inited方法的具體用法?PHP Base_model::_inited怎麽用?PHP Base_model::_inited使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Base_model
的用法示例。
在下文中一共展示了Base_model::_inited方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @access public
*/
public function __construct()
{
parent::__construct();
if (is_null($this->db_group)) {
include APPPATH . 'config/database.php';
$this->db_group = $active_group;
}
$this->{$this->db_group} = $this->load->database($this->db_group, TRUE);
if (self::$_inited) {
return;
}
self::$_inited = true;
// Doesn't work with multiple DB
// $CI =& get_instance();
// $CI->{$this->db_group} = $CI->load->database($this->db_group, TRUE);
// $this->{$this->db_group} = $this->load->database($this->db_group, TRUE);
// Unlock the publish filter (filter on publish status of each item)
if (Connect()->is('editors')) {
self::unlock_publish_filter();
}
}
示例2: __construct
/**
* Constructor
*
* @access public
*/
public function __construct()
{
parent::__construct();
if (is_null($this->db_group)) {
$active_group = 'default';
include APPPATH . 'config/database.php';
$this->db_group = $active_group;
}
$this->{$this->db_group} = $this->load->database($this->db_group, TRUE);
if (self::$_inited) {
return;
}
self::$_inited = TRUE;
self::$ci =& get_instance();
// Unlock the publish filter (filter on publish status of each item)
if (Authority::can('access', 'admin')) {
self::unlock_publish_filter();
}
}
示例3: __construct
/**
* Constructor
*
* @access public
*/
public function __construct()
{
parent::__construct();
if (self::$_inited) {
return;
}
self::$_inited = true;
$CI =& get_instance();
// Unlock the publish filter (filter on publish status of each item)
if (Connect()->is('editors')) {
self::unlock_publish_filter();
}
}