本文整理汇总了PHP中Base_module_model::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_module_model::__construct方法的具体用法?PHP Base_module_model::__construct怎么用?PHP Base_module_model::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base_module_model
的用法示例。
在下文中一共展示了Base_module_model::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @access public
* @return void
*/
public function __construct()
{
$CI =& get_instance();
$tables = $CI->config->item('tables', 'fuel');
parent::__construct($tables['fuel_navigation_groups']);
$this->add_validation('name', array(&$this, 'valid_name'), lang('error_requires_string_value'));
}
示例2: lang
function __construct()
{
parent::__construct('blog_comments', BLOG_FOLDER);
// table name
$this->add_validation('author_email', 'valid_email', lang('blog_error_invalid_comment_email'));
$this->add_filter($this->_tables['blog_posts'] . '.title');
}
示例3: array
function __construct()
{
parent::__construct('blog_posts', BLOG_FOLDER);
// table name
$CI =& get_instance();
if ($CI->fuel->blog->config('multiple_authors')) {
$authors = array('authors' => array('model' => array(BLOG_FOLDER => 'blog_users')));
$this->has_many = array_merge($authors, $this->has_many);
}
}
示例4: __construct
public function __construct()
{
parent::__construct($this->name);
// table name
$this->record_class = ucfirst($this->name) . '_item';
if (!empty($this->has_many['tags'])) {
$this->has_many['tags']['where'] = '(FIND_IN_SET("' . $this->name . '", ' . $this->_tables['fuel_tags'] . '.context) OR ' . $this->_tables['fuel_tags'] . '.context="")';
}
if (!empty($this->foreign_keys['category_id'])) {
$this->foreign_keys['category_id']['where'] = '(FIND_IN_SET("' . $this->name . '", ' . $this->_tables['fuel_categories'] . '.context) OR ' . $this->_tables['fuel_categories'] . '.context="")';
}
}
示例5: __construct
public function __construct($table_name)
{
// Main entries table
parent::__construct($table_name);
// Align record model name
// Define the record class name, rather for it to when crazy
$this->record_class = $table_name . "_record";
// 1. For benchmark (profiler) to keep track total execute time
// Able to disable through "application/config/MY_config.php"
// 2. For Error switching purpose
//$this->CI =& get_instance();
//$this->CI->config->load("MY_config");
$this->config->load("MY_config");
}
示例6: __construct
public function __construct()
{
parent::__construct('blocks');
}
示例7:
function __construct()
{
parent::__construct('fuel_blog_links', BLOG_FOLDER);
// table name
}
示例8:
function __construct()
{
parent::__construct('fuel_newsletter_drafts', NEWSLETTER_FOLDER);
}
示例9:
function __construct()
{
parent::__construct('articles');
// table name
}
示例10: __construct
/**
* Constructor.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct('fuel_permissions');
}
示例11: __construct
/**
* Constructor.
*
* @access public
* @return void
*/
public function __construct($logs_table = 'fuel_logs')
{
parent::__construct($logs_table);
$this->_logs_table = $logs_table == 'fuel_logs' ? $this->_tables[$logs_table] : $logs_table;
$this->filters = array('entry_date', $this->_tables['fuel_users'] . '.first_name', $this->_tables['fuel_users'] . '.last_name', 'message');
}
示例12: __construct
/**
* Constructor.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct('fuel_tags');
// table name
$this->init_relationships();
}
示例13:
function __construct()
{
parent::__construct('fuel_blog_users', BLOG_FOLDER);
// table name
$this->add_validation('email', 'valid_email', 'Please enter in a valid email');
}
示例14:
function __construct()
{
parent::__construct('social_icons', SOCIAL_FOLDER);
// table name
}
示例15: __construct
public function __construct()
{
parent::__construct('form_entries', FORMS_FOLDER);
// table name
$this->filters = array($this->_tables['forms'] . '.name', 'post', 'date_added');
}