public function setEnvironment($environment)
    {
        if (array_key_exists('environments', $this->configuration) && array_key_exists($environment, $this->configuration['environments'])) {
            $this->environment = $environment;
            return $this;
        }

        throw new RuntimeException(sprintf('The environment "%s" does not exists.', $environment), 100);
    }
public function setEnvironment($environment)
    {
        if (array_key_exists('environments', $this->configuration) && array_key_exists($environment, $this->configuration['environments'])) {
            $this->environment = $environment;
            return $this;
        }

        throw new RuntimeException(sprintf('The environment "%s" does not exists.', $environment), 100);
    }
public function setEnvironment ( $ environment ) { if ( array_key_exists ( 'environments' , $ this -> configuration ) && array_key_exists ( $ environment , $ this -> configuration [ 'environments' ] ) ) { $ this -> environment = $ environment ; return $ this ; } throw new RuntimeException ( sprintf ( 'The environment "%s" does not exists.' , $ environment ) , 100 ) ; }
Sets the working Environment

@param string $environment Environment name
@return Runtime
@throws RuntimeException
Sets the working Environment