public function getListeners( $eventName = NULL )
    {
        if ( NULL !== $eventName )
        {
            if ( !isset( $this->_sorted[ $eventName ] ) )
            {
                $this->sortListeners( $eventName );
            }

            return $this->_sorted[ $eventName ];
        }

        foreach ( array_keys( $this->listeners ) as $eventName )
        {
            if ( !isset( $this->_sorted[ $eventName ] ) )
            {
                $this->sortListeners( $eventName );
            }
        }

        return array_filter( $this->_sorted );
    }
public function getListeners( $eventName = NULL )
    {
        if ( NULL !== $eventName )
        {
            if ( !isset( $this->_sorted[ $eventName ] ) )
            {
                $this->sortListeners( $eventName );
            }

            return $this->_sorted[ $eventName ];
        }

        foreach ( array_keys( $this->listeners ) as $eventName )
        {
            if ( !isset( $this->_sorted[ $eventName ] ) )
            {
                $this->sortListeners( $eventName );
            }
        }

        return array_filter( $this->_sorted );
    }
public function getListeners ( $ eventName = NULL ) { if ( NULL !== $ eventName ) { if ( ! isset ( $ this -> _sorted [ $ eventName ] ) ) { $ this -> sortListeners ( $ eventName ) ; } return $ this -> _sorted [ $ eventName ] ; } foreach ( array_keys ( $ this -> listeners ) as $ eventName ) { if ( ! isset ( $ this -> _sorted [ $ eventName ] ) ) { $ this -> sortListeners ( $ eventName ) ; } } return array_filter ( $ this -> _sorted ) ; }
Get all listeners or just for an event.

@param string $eventName

@return array
Get all listeners or just for an event .