public function getListeners($eventName = NULL)
	{
		if($eventName === NULL)
		{
			$listeners = [];
			
			foreach(array_keys($this->listeners) as $k)
			{
				$listeners[$k] = [];
				
				foreach(clone $this->listeners[$k] as $listener)
				{
					$listeners[$k][] = $listener;
				}
			}
			
			ksort($listeners);
			
			return $listeners;
		}
		
		if($eventName instanceof \ReflectionClass)
		{
			$eventName = $eventName->name;
		}
		
		if(empty($this->listeners[$eventName]))
		{
			return [];
		}
		
		$listeners = [];
		
		foreach(clone $this->listeners[$eventName] as $listener)
		{
			$listeners[] = $listener;
		}
		
		return $listeners;
	}
public function getListeners($eventName = NULL)
	{
		if($eventName === NULL)
		{
			$listeners = [];
			
			foreach(array_keys($this->listeners) as $k)
			{
				$listeners[$k] = [];
				
				foreach(clone $this->listeners[$k] as $listener)
				{
					$listeners[$k][] = $listener;
				}
			}
			
			ksort($listeners);
			
			return $listeners;
		}
		
		if($eventName instanceof \ReflectionClass)
		{
			$eventName = $eventName->name;
		}
		
		if(empty($this->listeners[$eventName]))
		{
			return [];
		}
		
		$listeners = [];
		
		foreach(clone $this->listeners[$eventName] as $listener)
		{
			$listeners[] = $listener;
		}
		
		return $listeners;
	}
public function getListeners ( $ eventName = NULL ) { if ( $ eventName === NULL ) { $ listeners = [ ] ; foreach ( array_keys ( $ this -> listeners ) as $ k ) { $ listeners [ $ k ] = [ ] ; foreach ( clone $ this -> listeners [ $ k ] as $ listener ) { $ listeners [ $ k ] [ ] = $ listener ; } } ksort ( $ listeners ) ; return $ listeners ; } if ( $ eventName instanceof \ ReflectionClass ) { $ eventName = $ eventName -> name ; } if ( empty ( $ this -> listeners [ $ eventName ] ) ) { return [ ] ; } $ listeners = [ ] ; foreach ( clone $ this -> listeners [ $ eventName ] as $ listener ) { $ listeners [ ] = $ listener ; } return $ listeners ; }
Get all event listeners for the given event.

@codeCoverageIgnore

@param string $eventName
@return array<EventListenerInterface>
Get all event listeners for the given event .