public function createContainer(string $method = null, string $path = null): LimoncelloContainerInterface
    {
        $container = $this->createContainerInstance();

        $routeConfigurators = [];
        $coreData           = $this->getCoreData();
        if (empty($method) === false && empty($path) === false) {
            list(, , , , , $routeConfigurators) = $this->initRouter($coreData)->match($method, $path);
        }

        // configure container
        assert(!empty($coreData));
        $globalConfigurators = CoreData::getGlobalConfiguratorsFromData($coreData);
        $this->configureContainer($container, $globalConfigurators, $routeConfigurators);

        return $container;
    }
public function createContainer(string $method = null, string $path = null): LimoncelloContainerInterface
    {
        $container = $this->createContainerInstance();

        $routeConfigurators = [];
        $coreData           = $this->getCoreData();
        if (empty($method) === false && empty($path) === false) {
            list(, , , , , $routeConfigurators) = $this->initRouter($coreData)->match($method, $path);
        }

        // configure container
        assert(!empty($coreData));
        $globalConfigurators = CoreData::getGlobalConfiguratorsFromData($coreData);
        $this->configureContainer($container, $globalConfigurators, $routeConfigurators);

        return $container;
    }
public function createContainer ( string $ method = null , string $ path = null ) : LimoncelloContainerInterface { $ container = $ this -> createContainerInstance ( ) ; $ routeConfigurators = [ ] ; $ coreData = $ this -> getCoreData ( ) ; if ( empty ( $ method ) === false && empty ( $ path ) === false ) { list ( , , , , , $ routeConfigurators ) = $ this -> initRouter ( $ coreData ) -> match ( $ method , $ path ) ; } // configure container assert ( ! empty ( $ coreData ) ) ; $ globalConfigurators = CoreData :: getGlobalConfiguratorsFromData ( $ coreData ) ; $ this -> configureContainer ( $ container , $ globalConfigurators , $ routeConfigurators ) ; return $ container ; }
Get container from application. If `method` and `path` are specified the container will be configured
not only with global container configurators but with route's one as well.

@param string|null $method
@param string|null $path

@return LimoncelloContainerInterface

@throws ReflectionException

@SuppressWarnings(PHPMD.StaticAccess)
Get container from application . If method and path are specified the container will be configured not only with global container configurators but with route s one as well .