original_string: 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);
  					}
  				}
  				
  			}
  			
  		}
  		
  	}
code: 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);
  					}
  				}
  				
  			}
  			
  		}
  		
  	}
code_tokens: 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 ) ; } } } } }
docstring: Load listeners that may be a part of plug-ins that should be notified by the dispatcher
docstring_tokens: Load listeners that may be a part of plug - ins that should be notified by the dispatcher