Return an instance of default resolver as DispatcherFactoryInterface.

@param \Psr\Container\ContainerInterface $container
@return \Ellipse\DispatcherFactoryInterface
429688
public function getDispatcherFactory(ContainerInterface $container): DispatcherFactoryInterface
    {
        $autowired = $container->get('ellipse.dispatcher.autowiring.status');

        if ($autowired) {

            $interfaces = $container->get('ellipse.dispatcher.autowiring.interfaces');

            $container = new ReflectionContainer($container, $interfaces);

        }

        return new DefaultResolver($container);
    }
935608
public function get($container = null)
    {
        if ($container) {
            return $container->get($this->id);
        }
        return Ioc::container()->get($this->id);
    }
890513
public function loadContextInstancesByContainer(ContainerInterface $container)
    {

        // initialize the array for the context instances
        $contextInstances = array();

        // iterate over all applications and create the context configuration
        foreach (glob($container->getAppBase() . '/*', GLOB_ONLYDIR) as $webappPath) {
            $context = $this->loadContextInstance($container->getContainerNode(), $webappPath);
            $contextInstances[$context->getName()] = $context;
        }

        // return the array with the context instances
        return $contextInstances;
    }
624699
public static function create(Container $container = null) : Application
    {
        if ($container !== null) {
            $valueResolver   = $container->getValueResolver();
            $injectionPolicy = $container->getInjectionPolicy();
        } else {
            $valueResolver   = new DefaultValueResolver();
            $injectionPolicy = new InjectionPolicy\NullPolicy();
        }

        return new Application($valueResolver, $injectionPolicy);
    }
29573
public function register(ContainerInterface $container)
    {
        if (! isset($container['session'])) {
            $container['session'] = function (ContainerInterface $container) {
                return new Session;
            };
        }

        if (! isset($container['router'])) {
            /**
             * This service MUST return a SHARED instance
             * of Mbh\Interfaces\RouterInterface.
             *
             * @param Container $container
             * @return RouterInterface
             */
            $container['router'] = function (ContainerInterface $container) {
                $routerCacheFile = false;
                if (isset($container->get('settings')['routerCacheFile'])) {
                    $routerCacheFile = $container->get('settings')['routerCacheFile'];
                }

                $router = (new Router)->setCacheFile($routerCacheFile);
                if (method_exists($router, 'setContainer')) {
                    $router->setContainer($container);
                }

                if (method_exists($router, 'setCallableResolver')) {
                    $router->setCallableResolver($container['callableResolver']);
                }

                return $router;
            };
        }
    }
687556
public function createService(ServiceLocatorInterface $container)
    {
        // Retrieve the parent container when under zend-servicemanager v2
        if (method_exists($container, 'getServiceLocator')) {
            $container = $container->getServiceLocator() ?: $container;
        }

        return $this($container, ModuleOptions::class);
    }
799741
private static function invalidRequestHandler(ContainerInterface $container): InvalidRequestHandlerInterface
    {
        if (!$container->has(InvalidRequestHandlerInterface::class)) {
            return new InvalidRequestHandler();
        }

        return $container->get(InvalidRequestHandlerInterface::class);
    }
1136405
public function resolveAndCreate($namespace, ContainerInterface $container)
    {
        $class = new \ReflectionClass($namespace);
        $arguments = $this->resolveReflectionArguments($class, $container);

        return $class->newInstanceArgs($arguments);
    }
1148016
protected function addCommandList(
        DependencyContainerInterface $container
    ): DependencyContainerInterface {
        $container[self::COMMAND_LIST] = function (DependencyContainerInterface $container) {
            return $this->getCommandList();
        };

        return $container;
    }
738584
public function buildWhere(ContainerInterface $container)
    {
        $this->initRoot();
        $condition = $this->doBuildWhere($container);
        if ($this->condition = $this->trimAndOr($condition)) {
            $this->queryBuilder->andWhere($this->condition);
            if (count($this->parameters)) {
                $this->queryBuilder->setParameters($this->parameters, $this->parametersTypes);
            }
        }

        return $this;
    }
749984
public function get(Container $container)
    {
        if ($this->scope === null) {
            $this->scope = $this->getDefaultScope();
        }

        return $this->scope->get($this, $container);
    }
1165288
public function provideBusinessLayerDependencies(Container $container)
    {
        $container = $this->addQueueAdapter($container);
        $container = $this->addGuzzleClient($container);

        return $container;
    }
401561
public function resolveInjectable(Container $container, $class)
    {
        $id = $this->key === null ? $class : $this->key;

        if ($container->has($id)) {
            return $container->get($id, $this->new);
        }

        if (!class_exists($id)) {
            throw new DependencyResolutionException(
                sprintf('Class: "%s" not exists.', $id)
            );
        }

        return $container->newInstance($id);
    }
61870
public function build(array $config, ContainerInterface $container = null)
    {
        $dispatcher = new Dispatcher($container);
        foreach ((array) $config as $name => $listeners) {
            foreach ($listeners as $listener) {
                if (is_callable($listener)) {
                    $dispatcher->register($name, $listener);
                    continue;
                }

                $listener = $this->applyDefaults($listener);

                $dispatcher->register(
                    $name,
                    $this->buildDefinition($listener)
                );
            }
        }

        return $dispatcher;
    }
574351
private static function errorHandler(ContainerInterface $container): ErrorHandlerInterface
    {
        if (!$container->has(ErrorHandlerInterface::class)) {
            return new ErrorHandler();
        }

        return $container->get(ErrorHandlerInterface::class);
    }
521310
protected static function getLoggerIfEnabled(ContainerInterface $container): ?LoggerInterface
    {
        $logger = null;
        if ($container->has(LoggerInterface::class) === true &&
            $container->get(SettingsProviderInterface::class)->get(S::class)[S::KEY_IS_LOG_ENABLED] === true
        ) {
            $logger = $container->get(LoggerInterface::class);
        }

        return $logger;
    }
980752
private static function processor(ContainerInterface $container): ProcessorInterface
    {
        if (!$container->has(ProcessorInterface::class)) {
            return new WebProcessor($container);
        }

        return $container->get(ProcessorInterface::class);
    }