protected function fireEvent($eventName, Event $event)
    {
        if (!$this->eventDispatcher) {
            throw new \BadMethodCallException(sprintf(
                'Method %s() cannot be used while event dispatcher is not configured.',
                __METHOD__
            ));
        }

        $this->eventDispatcher->dispatch($eventName, $event);
    }
protected function fireEvent($eventName, Event $event)
    {
        if (!$this->eventDispatcher) {
            throw new \BadMethodCallException(sprintf(
                'Method %s() cannot be used while event dispatcher is not configured.',
                __METHOD__
            ));
        }

        $this->eventDispatcher->dispatch($eventName, $event);
    }
protected function fireEvent ( $ eventName , Event $ event ) { if ( ! $ this -> eventDispatcher ) { throw new \ BadMethodCallException ( sprintf ( 'Method %s() cannot be used while event dispatcher is not configured.' , __METHOD__ ) ) ; } $ this -> eventDispatcher -> dispatch ( $ eventName , $ event ) ; }
fire given event.

@param string $eventName
@param Event  $event

@throws \BadMethodCallException If any event dispatcher set
fire given event .