src/Environment.php
protected function currentEnvironment($environment = null, $default = 'development')
    {
        $current = ($environment === null) ? $default : $environment;
        if (empty($environment)) {
            foreach ($this->environments as $name => $config) {
                if ($this->_match($name, $config['params'])) {
                    $current = $name;
                    break;
                }
            }
        }

        return $current;
    }
protected function currentEnvironment($environment = null, $default = 'development')
    {
        $current = ($environment === null) ? $default : $environment;
        if (empty($environment)) {
            foreach ($this->environments as $name => $config) {
                if ($this->_match($name, $config['params'])) {
                    $current = $name;
                    break;
                }
            }
        }

        return $current;
    }
protected function currentEnvironment ( $ environment = null , $ default = 'development' ) { $ current = ( $ environment === null ) ? $ default : $ environment ; if ( empty ( $ environment ) ) { foreach ( $ this -> environments as $ name => $ config ) { if ( $ this -> _match ( $ name , $ config [ 'params' ] ) ) { $ current = $ name ; break ; } } } return $ current ; }
Gets the current environment

@param string $environment Name of the environment we want to force setup for
@param string $default Default environment name
@return string
Gets the current environment