public function remove($listener)
    {
        if ($this->storage->contains($listener)) {
            $this->storage->detach($listener);
            $this->storage->rewind();

            $this->queue = new \SplPriorityQueue();

            foreach ($this->storage as $listener) {
                $priority = $this->storage->getInfo();
                $this->queue->insert($listener, $priority);
            }
        }

        return $this;
    }
public function remove($listener)
    {
        if ($this->storage->contains($listener)) {
            $this->storage->detach($listener);
            $this->storage->rewind();

            $this->queue = new \SplPriorityQueue();

            foreach ($this->storage as $listener) {
                $priority = $this->storage->getInfo();
                $this->queue->insert($listener, $priority);
            }
        }

        return $this;
    }
public function remove ( $ listener ) { if ( $ this -> storage -> contains ( $ listener ) ) { $ this -> storage -> detach ( $ listener ) ; $ this -> storage -> rewind ( ) ; $ this -> queue = new \ SplPriorityQueue ( ) ; foreach ( $ this -> storage as $ listener ) { $ priority = $ this -> storage -> getInfo ( ) ; $ this -> queue -> insert ( $ listener , $ priority ) ; } } return $ this ; }
Remove a listener from the queue.

@param   \Closure|object $listener The listener.

@return  ListenersQueue  This method is chainable.

@since   2.0
Remove a listener from the queue .