public function removeListener( $eventName, IListener $listener )
    {
        if ( !isset( $this->listeners[ $eventName ] ) )
        {
            return $this;
        }

        foreach ( $this->listeners[ $eventName ] as $priority => $listeners )
        {
            if ( FALSE !== ( $key = array_search( $listener, $listeners, TRUE ) ) )
            {
                unset( $this->listeners[ $eventName ][ $priority ][ $key ], $this->_sorted[ $eventName ] );
            }
        }

        return $this;
    }
public function removeListener( $eventName, IListener $listener )
    {
        if ( !isset( $this->listeners[ $eventName ] ) )
        {
            return $this;
        }

        foreach ( $this->listeners[ $eventName ] as $priority => $listeners )
        {
            if ( FALSE !== ( $key = array_search( $listener, $listeners, TRUE ) ) )
            {
                unset( $this->listeners[ $eventName ][ $priority ][ $key ], $this->_sorted[ $eventName ] );
            }
        }

        return $this;
    }
public function removeListener ( $ eventName , IListener $ listener ) { if ( ! isset ( $ this -> listeners [ $ eventName ] ) ) { return $ this ; } foreach ( $ this -> listeners [ $ eventName ] as $ priority => $ listeners ) { if ( FALSE !== ( $ key = array_search ( $ listener , $ listeners , TRUE ) ) ) { unset ( $ this -> listeners [ $ eventName ] [ $ priority ] [ $ key ] , $ this -> _sorted [ $ eventName ] ) ; } } return $ this ; }
Remove a listener from an event.

@param string    $eventName
@param IListener $listener

@return IDispatcher
Remove a listener from an event .