src/Sulu/Component/Webspace/Portal.php
public function getEnvironment($type)
    {
        if (!isset($this->environments[$type])) {
            throw new EnvironmentNotFoundException($this, $type);
        }

        return $this->environments[$type];
    }
public function getEnvironment($type)
    {
        if (!isset($this->environments[$type])) {
            throw new EnvironmentNotFoundException($this, $type);
        }

        return $this->environments[$type];
    }
public function getEnvironment ( $ type ) { if ( ! isset ( $ this -> environments [ $ type ] ) ) { throw new EnvironmentNotFoundException ( $ this , $ type ) ; } return $ this -> environments [ $ type ] ; }
Returns the environment with the given type, and throws an exception if the environment does not exist.

@param string $type

@throws Exception\EnvironmentNotFoundException

@return \Sulu\Component\Webspace\Environment
Returns the environment with the given type and throws an exception if the environment does not exist .