original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Sets the current runtime environment