/**
  * Initializes the FTL Manager.
  * 
  * @return void
  */
 public static function init()
 {
     if (self::$_inited) {
         return;
     }
     self::$_inited = TRUE;
     self::$ci =& get_instance();
     self::$context = new FTL_ArrayContext();
     // Inlude array of module definition. This file is generated by module installation in Ionize.
     // This file contains definition for installed modules only.
     include APPPATH . 'config/modules.php';
     // Put modules arrays keys to lowercase
     if (!empty($modules)) {
         self::$module_folders = array_combine(array_map('strtolower', array_values($modules)), array_values($modules));
     }
     // Loads automatically all installed modules tags
     foreach (self::$module_folders as $module) {
         self::autoload_module_tags($module . '_Tags');
     }
     // Load automatically all TagManagers defined in /libraries/Tagmanager
     $tagmanagers = glob(APPPATH . 'libraries/Tagmanager/*' . EXT);
     foreach ($tagmanagers as $tagmanager) {
         self::autoload(array_pop(explode('/', $tagmanager)));
     }
     self::add_globals('TagManager');
     self::add_tags();
     self::add_module_tags();
 }
Exemplo n.º 2
0
 /**
  * Initializes the FTL Manager.
  *
  * @return void
  *
  */
 public static function init()
 {
     if (self::$_inited) {
         return;
     }
     self::$_inited = TRUE;
     self::$ci =& get_instance();
     self::$context = new FTL_ArrayContext();
     // Inlude array of module definition. This file is generated by module installation in Ionize.
     // This file contains definition for installed modules only.
     include APPPATH . 'config/modules.php';
     self::get_uri_segments();
     /*
      * Previously : Loaded before core Tagmenagers
      *
     // Put modules arrays keys to lowercase
     if (!empty($modules))
     	self::$module_folders = array_combine(array_map('strtolower', array_values($modules)), array_values($modules));
     
     // Loads automatically all installed modules tags
     foreach (self::$module_folders as $module)
     {
     	self::autoload_module_tags($module.'_Tags');
     }
     */
     // Load automatically all TagManagers defined in /libraries/Tagmanager
     $tagmanagers = glob(APPPATH . 'libraries/Tagmanager/*' . EXT);
     $theme_tagmanagers = glob(FCPATH . Theme::get_theme_path() . 'libraries/Tagmanager/*' . EXT);
     if (!empty($theme_tagmanagers)) {
         $tagmanagers = array_merge($tagmanagers, $theme_tagmanagers);
     }
     foreach ($tagmanagers as $tagmanager) {
         self::autoload($tagmanager);
     }
     // Put modules arrays keys to lowercase
     if (!empty($modules)) {
         self::$module_folders = array_combine(array_map('strtolower', array_values($modules)), array_values($modules));
     }
     // Loads automatically all installed modules tags
     foreach (self::$module_folders as $module) {
         self::autoload_module_tags($module . '_Tags');
     }
     self::add_globals();
     self::add_tags();
     self::add_module_tags();
     self::process_form();
     register_shutdown_function(array('TagManager', 'call_shutdown'));
 }