src/Bootstrap/RegisterConfigTrait.php
private function registerConfig()
    {
        /**
         * @param Container $di
         * @return Config
         */
        $this->getContainer()[Config::CONTAINER_ID] = function(Container $di){
            /* @var ConfigLoaderInterface $loader */
            $loader = $di[ConfigLoaderInterface::CONTAINER_ID];
            $params = $loader->load();
            $config = new Config();
            $config->setParams($params);
            return $config;
        };
    }
private function registerConfig()
    {
        /**
         * @param Container $di
         * @return Config
         */
        $this->getContainer()[Config::CONTAINER_ID] = function(Container $di){
            /* @var ConfigLoaderInterface $loader */
            $loader = $di[ConfigLoaderInterface::CONTAINER_ID];
            $params = $loader->load();
            $config = new Config();
            $config->setParams($params);
            return $config;
        };
    }
private function registerConfig ( ) { /**
         * @param Container $di
         * @return Config
         */ $ this -> getContainer ( ) [ Config :: CONTAINER_ID ] = function ( Container $ di ) { /* @var ConfigLoaderInterface $loader */ $ loader = $ di [ ConfigLoaderInterface :: CONTAINER_ID ] ; $ params = $ loader -> load ( ) ; $ config = new Config ( ) ; $ config -> setParams ( $ params ) ; return $ config ; } ; }
Register the config to the DI container
Register the config to the DI container