protected function dispatchEvent($name, Event $event)
    {
        if ($this->dispatcher) {
            $this->dispatcher->dispatch($name, $event);
        }
    }
protected function dispatchEvent($name, Event $event)
    {
        if ($this->dispatcher) {
            $this->dispatcher->dispatch($name, $event);
        }
    }
protected function dispatchEvent ( $ name , Event $ event ) { if ( $ this -> dispatcher ) { $ this -> dispatcher -> dispatch ( $ name , $ event ) ; } }
Relay events to all listeners.

@param string $name
@param Event $event
Relay events to all listeners .