public function setRunningEnvironment($running_env)
    {
        $running_env = (string)$running_env;
        if (empty($running_env)) {
            $this->toss(
                "InvalidArgument",
                "The environment name cannot be empty."
            );
        }
        
        $previous = $this->running_env;
        $this->running_env = $running_env;
        if (!isset($this->callbacks[$this->running_env])) {
            $this->setCallback(
                $this->running_env,
                $this->getDefaultCallback()
            );
        }

        return $previous;
    }
public function setRunningEnvironment($running_env)
    {
        $running_env = (string)$running_env;
        if (empty($running_env)) {
            $this->toss(
                "InvalidArgument",
                "The environment name cannot be empty."
            );
        }
        
        $previous = $this->running_env;
        $this->running_env = $running_env;
        if (!isset($this->callbacks[$this->running_env])) {
            $this->setCallback(
                $this->running_env,
                $this->getDefaultCallback()
            );
        }

        return $previous;
    }
public function setRunningEnvironment ( $ running_env ) { $ running_env = ( string ) $ running_env ; if ( empty ( $ running_env ) ) { $ this -> toss ( "InvalidArgument" , "The environment name cannot be empty." ) ; } $ previous = $ this -> running_env ; $ this -> running_env = $ running_env ; if ( ! isset ( $ this -> callbacks [ $ this -> running_env ] ) ) { $ this -> setCallback ( $ this -> running_env , $ this -> getDefaultCallback ( ) ) ; } return $ previous ; }
Sets the current runtime environment

Automatically sets the default error callback for this environment if none has been
set already. Returns the previously set running environment.

@param  string $running_env Name of the environment

@return string
Sets the current runtime environment