protected static function loadListeners() {
		
		// default var
		$configDir = Config::getOption("configDir");
		
		// make sure the listener data exists
		if (file_exists($configDir."/listeners.json")) {
			
			// get listener list data
			$listenerList = json_decode(file_get_contents($configDir."/listeners.json"), true);
			
			// get the listener info
			foreach ($listenerList["listeners"] as $listenerName) {
				
				if ($listenerName[0] != "_") {
					$listener  = new $listenerName();
					$listeners = $listener->getListeners();
					foreach ($listeners as $event => $eventProps) {
						$eventPriority = (isset($eventProps["priority"])) ? $eventProps["priority"] : 0;
						self::$instance->addListener($event, array($listener, $eventProps["callable"]), $eventPriority);
					}
				}
				
			}
			
		}
		
	}
protected static function loadListeners() {
		
		// default var
		$configDir = Config::getOption("configDir");
		
		// make sure the listener data exists
		if (file_exists($configDir."/listeners.json")) {
			
			// get listener list data
			$listenerList = json_decode(file_get_contents($configDir."/listeners.json"), true);
			
			// get the listener info
			foreach ($listenerList["listeners"] as $listenerName) {
				
				if ($listenerName[0] != "_") {
					$listener  = new $listenerName();
					$listeners = $listener->getListeners();
					foreach ($listeners as $event => $eventProps) {
						$eventPriority = (isset($eventProps["priority"])) ? $eventProps["priority"] : 0;
						self::$instance->addListener($event, array($listener, $eventProps["callable"]), $eventPriority);
					}
				}
				
			}
			
		}
		
	}
protected static function loadListeners ( ) { // default var $ configDir = Config :: getOption ( "configDir" ) ; // make sure the listener data exists if ( file_exists ( $ configDir . "/listeners.json" ) ) { // get listener list data $ listenerList = json_decode ( file_get_contents ( $ configDir . "/listeners.json" ) , true ) ; // get the listener info foreach ( $ listenerList [ "listeners" ] as $ listenerName ) { if ( $ listenerName [ 0 ] != "_" ) { $ listener = new $ listenerName ( ) ; $ listeners = $ listener -> getListeners ( ) ; foreach ( $ listeners as $ event => $ eventProps ) { $ eventPriority = ( isset ( $ eventProps [ "priority" ] ) ) ? $ eventProps [ "priority" ] : 0 ; self :: $ instance -> addListener ( $ event , array ( $ listener , $ eventProps [ "callable" ] ) , $ eventPriority ) ; } } } } }
Load listeners that may be a part of plug-ins that should be notified by the dispatcher
Load listeners that may be a part of plug - ins that should be notified by the dispatcher