Consolidation\Cgr\Env::apply PHP Method

apply() public method

Apply a set of environment variables; return the original value of any value that is set, to avoid polluting the environment.
public apply ( ) : Env
return Env
    public function apply()
    {
        $orig = array();
        foreach ($this->env as $key => $value) {
            $orig[$key] = getenv($key);
            static::setEnvValue($key, $value);
        }
        return new Env($orig);
    }