public function initEnvironment(Config $config)
    {
        if (isset($config->application) && isset($config->application->environment)) {
            $env = $config->application->environment;
        } else {
            $env = Constants::DEFAULT_ENV;
        }

        if (!defined('APPLICATION_ENV')) {
            define('APPLICATION_ENV', $env);
        }

        $this->getDI()->set('environment', function() use ($env) {
            return $env;
        }, true);
    }
public function initEnvironment(Config $config)
    {
        if (isset($config->application) && isset($config->application->environment)) {
            $env = $config->application->environment;
        } else {
            $env = Constants::DEFAULT_ENV;
        }

        if (!defined('APPLICATION_ENV')) {
            define('APPLICATION_ENV', $env);
        }

        $this->getDI()->set('environment', function() use ($env) {
            return $env;
        }, true);
    }
public function initEnvironment ( Config $ config ) { if ( isset ( $ config -> application ) && isset ( $ config -> application -> environment ) ) { $ env = $ config -> application -> environment ; } else { $ env = Constants :: DEFAULT_ENV ; } if ( ! defined ( 'APPLICATION_ENV' ) ) { define ( 'APPLICATION_ENV' , $ env ) ; } $ this -> getDI ( ) -> set ( 'environment' , function ( ) use ( $ env ) { return $ env ; } , true ) ; }
Initializes application environment
Initializes application environment