protected function dispatchEvent($event)
    {
        if (!$this->container) {
            throw new \RuntimeException("The container has not been set up.");
        }
        $dir = $this->container->getParameter('base_dir');
        if (!is_dir($dir) || !is_readable($dir)) {
            throw new \RuntimeException("'${dir}' is not a valid readable directory.");
        }
        $dispatcher = $this->container->get('event_dispatcher');
        $dispatcher->dispatch($event);
    }
protected function dispatchEvent($event)
    {
        if (!$this->container) {
            throw new \RuntimeException("The container has not been set up.");
        }
        $dir = $this->container->getParameter('base_dir');
        if (!is_dir($dir) || !is_readable($dir)) {
            throw new \RuntimeException("'${dir}' is not a valid readable directory.");
        }
        $dispatcher = $this->container->get('event_dispatcher');
        $dispatcher->dispatch($event);
    }
protected function dispatchEvent ( $ event ) { if ( ! $ this -> container ) { throw new \ RuntimeException ( "The container has not been set up." ) ; } $ dir = $ this -> container -> getParameter ( 'base_dir' ) ; if ( ! is_dir ( $ dir ) || ! is_readable ( $ dir ) ) { throw new \ RuntimeException ( "'${dir}' is not a valid readable directory." ) ; } $ dispatcher = $ this -> container -> get ( 'event_dispatcher' ) ; $ dispatcher -> dispatch ( $ event ) ; }
Dispatches an event

@throws \RuntimeException when the container is not present
@throws \RuntimeException when the site directory is not readable
Dispatches an event