Esempio n. 1
0
 /** Force env or read it
  * @param string $env Environment name
  * @return void
  */
 public static function set_env($env = null)
 {
     if (is_null($env)) {
         if (file_exists($ef = BASE_DIR . self::DIR_CONF_DIST . '/env')) {
             self::$env = trim(\System\File::read($ef));
         }
     } else {
         self::$env = $env;
     }
     if (!defined("YACMS_ENV")) {
         define("YACMS_ENV", self::$env);
     }
 }