本文整理汇总了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();
}
}