當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Base_module_model::__construct方法代碼示例

本文整理匯總了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'));
 }
開發者ID:ressphere,項目名稱:cb_iloveproperty,代碼行數:13,代碼來源:fuel_navigation_groups_model.php

示例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');
 }
開發者ID:kieranklaassen,項目名稱:FUEL-CMS,代碼行數:7,代碼來源:blog_comments_model.php

示例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);
     }
 }
開發者ID:hawkeye64,項目名稱:FUEL-CMS-Blog-Module,代碼行數:10,代碼來源:blog_posts_model.php

示例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="")';
     }
 }
開發者ID:nonconforme,項目名稱:FUEL-CMS,代碼行數:12,代碼來源:base_posts_model.php

示例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");
 }
開發者ID:ressphere,項目名稱:cb_iloveproperty,代碼行數:14,代碼來源:cb_base_module_model.php

示例6: __construct

 public function __construct()
 {
     parent::__construct('blocks');
 }
開發者ID:randombrad,項目名稱:FUEL-CMS,代碼行數:4,代碼來源:blocks_model.php

示例7:

 function __construct()
 {
     parent::__construct('fuel_blog_links', BLOG_FOLDER);
     // table name
 }
開發者ID:kieranklaassen,項目名稱:FUEL-CMS,代碼行數:5,代碼來源:blog_links_model.php

示例8:

 function __construct()
 {
     parent::__construct('fuel_newsletter_drafts', NEWSLETTER_FOLDER);
 }
開發者ID:goutamwms,項目名稱:newsletter-module-fuel-cms,代碼行數:4,代碼來源:newsletter_drafts_model.php

示例9:

 function __construct()
 {
     parent::__construct('articles');
     // table name
 }
開發者ID:kieranklaassen,項目名稱:FUEL-CMS,代碼行數:5,代碼來源:articles_model.php

示例10: __construct

 /**
  * Constructor.
  *
  * @access	public
  * @return	void
  */
 public function __construct()
 {
     parent::__construct('fuel_permissions');
 }
開發者ID:huayuxian,項目名稱:FUEL-CMS,代碼行數:10,代碼來源:fuel_permissions_model.php

示例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');
 }
開發者ID:huayuxian,項目名稱:FUEL-CMS,代碼行數:12,代碼來源:fuel_logs_model.php

示例12: __construct

 /**
  * Constructor.
  *
  * @access	public
  * @return	void
  */
 public function __construct()
 {
     parent::__construct('fuel_tags');
     // table name
     $this->init_relationships();
 }
開發者ID:huayuxian,項目名稱:FUEL-CMS,代碼行數:12,代碼來源:fuel_tags_model.php

示例13:

 function __construct()
 {
     parent::__construct('fuel_blog_users', BLOG_FOLDER);
     // table name
     $this->add_validation('email', 'valid_email', 'Please enter in a valid email');
 }
開發者ID:hawkeye64,項目名稱:FUEL-CMS-Blog-Module,代碼行數:6,代碼來源:blog_users_model.php

示例14:

 function __construct()
 {
     parent::__construct('social_icons', SOCIAL_FOLDER);
     // table name
 }
開發者ID:jpswade,項目名稱:FUEL-CMS-Social-Module,代碼行數:5,代碼來源:social_icons_model.php

示例15: __construct

 public function __construct()
 {
     parent::__construct('form_entries', FORMS_FOLDER);
     // table name
     $this->filters = array($this->_tables['forms'] . '.name', 'post', 'date_added');
 }
開發者ID:aaronharding,項目名稱:FUEL-CMS-Forms-Module,代碼行數:6,代碼來源:form_entries_model.php


注:本文中的Base_module_model::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。