/** * Method to initialize others libraries necessary to run the framework and the config files. * * @param string $pattern * @return void */ public function init($pattern = '') { self::$main_path = dirname(__FILE__) . '/'; //require and instantiate the Load library responsable for require all the components of the framework $load_class = 'Load'; $custom_load = Tk::$custom_lib_path . Tk::$extends_pref . "{$load_class}/" . Tk::$extends_pref . $load_class . Tk::$ext; require $load_class . self::$ext; if (file_exists($custom_load)) { require $custom_load; $load_class = self::$extends_pref . $load_class; } $this->Load = new $load_class(); $this->Load->lib('Config'); $this->Load->helper($this->Config->auto_load['helper']); $this->Load->lib($this->Config->auto_load['lib']); if (array_key_exists('model', $this->Config->auto_load)) { $this->Load->model($this->Config->auto_load['model']); } $this->Load->pattern($pattern); }