FOF30\Factory\BasicFactory::dispatcher PHP Method

dispatcher() public method

Creates a new Dispatcher
public dispatcher ( array $config = [] ) : Dispatcher
$config array The configuration values for the Dispatcher object
return FOF30\Dispatcher\Dispatcher
    public function dispatcher(array $config = array())
    {
        $dispatcherClass = $this->container->getNamespacePrefix($this->getSection()) . 'Dispatcher\\Dispatcher';
        try {
            return $this->createDispatcher($dispatcherClass, $config);
        } catch (DispatcherNotFound $e) {
            // Not found. Return the default Dispatcher
            return new Dispatcher($this->container, $config);
        }
    }