/** * 環境を指定(設定読み込み). * 必ず最初に呼ぶ. * @return 成功なら$env, 失敗ならnull. */ public static function setEnv($env) { include APP_ROOT . self::CONFIG_FILE; self::$env = $env; if (isset($serverenv_config[$env])) { self::$config = $serverenv_config[$env]; } else { static::errorLog("undefined environment"); self::$config = null; } return self::$config; }