Ejemplo n.º 1
0
 public function __construct(MapperConfig $config)
 {
     $this->config = $config;
     $this->xmlfileSelector = new SelectorUrlXmlMap($config->mapFile);
     \Jelix\Core\Includer::inc($this->xmlfileSelector, true);
     $this->dataCreateUrl =& $GLOBALS['SIGNIFICANT_CREATEURL'];
 }
Ejemplo n.º 2
0
 /**
  * return the list of all listener corresponding to an event
  * @param string $eventName the event name we wants the listeners for.
  * @return array of objects
  */
 protected static function loadListenersFor($eventName)
 {
     if (!self::$listenersConfig) {
         self::$compilerData[3] = App::config()->urlengine['urlScriptId'] . '.' . self::$compilerData[3];
         self::$listenersConfig = Includer::incAll(self::$compilerData);
     }
     $inf =& self::$listenersConfig;
     self::$hashListened[$eventName] = array();
     if (isset($inf[$eventName])) {
         $modules =& App::config()->_modulesPathList;
         foreach ($inf[$eventName] as $listener) {
             list($module, $listenerName) = $listener;
             if (!isset($modules[$module])) {
                 // some modules could be unused
                 continue;
             }
             if (!isset(self::$listenersSingleton[$module][$listenerName])) {
                 require_once $modules[$module] . 'classes/' . $listenerName . '.listener.php';
                 $className = $listenerName . 'Listener';
                 self::$listenersSingleton[$module][$listenerName] = new $className();
             }
             self::$hashListened[$eventName][] = self::$listenersSingleton[$module][$listenerName];
         }
     }
 }
Ejemplo n.º 3
0
 public static function clear()
 {
     \Jelix\Core\Includer::clear();
 }