/** * Add a module * * @access public * @param string Module name * @param array Module initialization parameters * @return void */ public function add($mod, $init) { // check for specific module overwrites like for Fuel_navigation and Fuel_block if (isset($init['folder'])) { $class_name = 'Fuel_' . strtolower($mod); $file_path = MODULES_PATH . $init['folder'] . '/libraries/' . $class_name . EXT; if (file_exists($file_path)) { // class must extend the fuel_module class to be legit if (strtolower(get_parent_class($class_name)) == 'fuel_module') { $this->CI->load->module_library($init['folder'], strtolower($class_name)); $fuel_module =& $this->CI->{$class_name}; } } } if (!isset($fuel_module)) { $fuel_module = new Fuel_module(); } $fuel_module->initialize($mod, $init); if (empty($init['disabled'])) { $this->_modules[$mod] = $fuel_module; } }
public function initialize($params = array()) { parent::initialize($params); }
/** * Initialize the object and set object parameters * * Accepts an associative array as input, containing object preferences. * * @access public * @param array Array of initalization parameters (optional) * @return void */ public function initialize($params = array()) { parent::initialize($params); // can't use because contstructor hasn't initialized $this->_perms = $this->model()->find_all_array_assoc('name'); }