Exemple #1
0
 /**
  * setEnvironment
  *
  * Allows one to override the default behavior of this class and 
  * set the environment manually.  This may be necessary of you are
  * running dev or qa code in a spot that this class would mistake
  * for some other environment.
  */
 public static function set($const = null)
 {
     if ($const) {
         self::$_environment = $const;
     } elseif (getenv('APPLICATION_ENV')) {
         self::$_environment = getenv('APPLICATION_ENV');
     } else {
         throw new Exception('No environment specified.');
     }
     return;
 }