original_string: 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);
              }
          }
      }
code: 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);
              }
          }
      }
code_tokens: 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 ) ; } } }
docstring: Publishes queued events.
  
  @return void
docstring_tokens: Publishes queued events .