public function flush()
    {
        $this->queue->setIteratorMode(\SplQueue::IT_MODE_DELETE);

        foreach ($this->queue as $event)
        {
            $class = get_class($event);

            foreach ($this->asynchronousEventMap->getListenersForEvent($class) as $listener)
            {
                $this->invokeListener($listener, $event);
            }
        }
    }
public function flush()
    {
        $this->queue->setIteratorMode(\SplQueue::IT_MODE_DELETE);

        foreach ($this->queue as $event)
        {
            $class = get_class($event);

            foreach ($this->asynchronousEventMap->getListenersForEvent($class) as $listener)
            {
                $this->invokeListener($listener, $event);
            }
        }
    }
public function flush ( ) { $ this -> queue -> setIteratorMode ( \ SplQueue :: IT_MODE_DELETE ) ; foreach ( $ this -> queue as $ event ) { $ class = get_class ( $ event ) ; foreach ( $ this -> asynchronousEventMap -> getListenersForEvent ( $ class ) as $ listener ) { $ this -> invokeListener ( $ listener , $ event ) ; } } }
Publishes queued events.

@return void
Publishes queued events .