当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_module_model::tables方法代码示例

本文整理汇总了PHP中Base_module_model::tables方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_module_model::tables方法的具体用法?PHP Base_module_model::tables怎么用?PHP Base_module_model::tables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_module_model的用法示例。


在下文中一共展示了Base_module_model::tables方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load_config

 /**
  * Loads the advanced modules config file
  *
  * @access	public
  * @param	string Name of config file. Default is the name of the advanced module (optional)
  * @return	void
  */
 public function load_config($config = NULL)
 {
     if (empty($config)) {
         $config = $this->name;
     }
     // last parameter tells it to fail gracefully
     // check application directory for overwrites
     $this->CI->load->module_config('app', $config, FALSE, TRUE);
     $app_config = $this->CI->config->item($this->name);
     // now get the blog configuration
     $this->CI->load->module_config($this->folder(), $config, FALSE, TRUE);
     $module_config = $this->CI->config->item($this->name);
     // if app config exists then merge
     if (!empty($app_config)) {
         $this->_config = array_merge($module_config, $app_config);
     } else {
         $this->_config = $module_config;
     }
     // special case for tables so that they are loaded into the static Base_module_model variable
     if ($this->CI->config->item('tables')) {
         if (!class_exists('Base_module_model')) {
             require_once BASEPATH . 'core/Model.php';
             require_once FUEL_PATH . 'models/base_module_model.php';
         }
         Base_module_model::$tables = array_merge(Base_module_model::$tables, $this->CI->config->item('tables'));
     }
 }
开发者ID:ressphere,项目名称:cb_iloveproperty,代码行数:34,代码来源:Fuel_advanced_module.php

示例2: __construct

 /**
  * Constructor
  *
  * @access	public
  * @param	string	The table name
  * @param	mixed	If an array, it will assume they are initialization properties. If a string, it will assume it's the name of the module the module exists in
  * @return	void
  */
 public function __construct($table = NULL, $params = NULL)
 {
     $CI =& get_instance();
     $CI->load->module_language(FUEL_FOLDER, 'fuel');
     // initialize parameters to pass to parent model
     // if it is a string, then we assume it's a module name, if it is an array, then we extract the module name from it'
     if (is_array($params)) {
         if (isset($params['module'])) {
             $module = $params['module'];
         }
     } else {
         $module = $params;
         $params = array();
     }
     if (!isset($module)) {
         $module = FUEL_FOLDER;
     }
     $fuel_tables = array();
     $module_tables = array();
     $config_tables = array();
     // first load the FUEL config so that we can get the tables
     $CI->config->module_load(FUEL_FOLDER, 'fuel', TRUE);
     $fuel_tables = $CI->config->item('tables', 'fuel');
     // load in the module configuration file
     if (!empty($module) and $module != FUEL_FOLDER) {
         // fail gracefully is last parameter
         $CI->config->module_load($module, $module, FALSE, TRUE);
         if ($CI->config->item('tables')) {
             $module_tables = $CI->config->item('tables');
         }
     }
     // look in the generic configuration space
     if ($CI->config->item('tables')) {
         $config_tables = $CI->config->item('tables');
     }
     // create master list of tables
     self::$tables = array_merge(self::$tables, $config_tables, $module_tables, $fuel_tables);
     $this->set_tables(self::$tables);
     // set the table to the configuration mapping if it is in array
     if ($this->tables($table)) {
         $table = $this->tables($table);
     }
     // if no configuration mapping is found then we will assume it is just the straight up table name
     parent::__construct($table, $params);
     // table name and params
     // load additional helpers here
     $this->load->helper('typography');
     $this->load->helper('text');
     $this->load->helper('markdown');
     $this->load->helper('format');
     // set formatters
     if (!empty($this->_formatters) and !empty($this->formatters)) {
         $this->formatters = array_merge_recursive($this->_formatters, $this->formatters);
     } else {
         $this->formatters = $this->_formatters;
     }
 }
开发者ID:prgoncalves,项目名称:Beatcrumb-web,代码行数:65,代码来源:base_module_model.php


注:本文中的Base_module_model::tables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。