public static function get($key) { if (static::$config === null) { include APP_ROOT . static::CONFIG_FILE; static::$config = $emlauncher_config[mfwServerEnv::getEnv()]; } return isset(static::$config[$key]) ? static::$config[$key] : null; }
function apache_log($key, $value) { static $log = array(); if (function_exists('apache_setenv')) { $log['env'] = mfwServerEnv::getEnv(); $log[$key] = $value; apache_setenv('LOGMSG', json_encode($log)); } }
protected function __construct() { include APP_ROOT . self::CONFIG_FILE; $this->title = isset($application_config['title']) ? $application_config['title'] : ''; $this->identifier = isset($application_config['identifier']) ? $application_config['identifier'] : ''; $i = str_replace(' ', '_', $this->identifier); $env = mfwServerEnv::getEnv(); $branch = basename(APP_ROOT); $this->cache_prefix = "{$i}_{$env}_{$branch}_"; }
public static function getPDO($name = null) { if ($name === null) { $name = self::DEFAULT_DBNAME; } $env = mfwServerEnv::getEnv(); if (!isset(self::$con_pool[$env][$name])) { $conf = mfwServerEnv::databaseSetting($name); $pdo = new PDO($conf['dsn'], $conf['user'], $conf['pass'], array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8')); self::$con_pool[$env][$name] = $pdo; } return self::$con_pool[$env][$name]; }
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <title><?php echo isset($page_title) ? htmlspecialchars($page_title) . ' | ' : ''; echo $title_prefix; ?> EMLauncher</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php if (mfwServerEnv::getEnv() === 'local') { ?> <link href="/bootstrap/bootswatch/spacelab/bootstrap.min.css" rel="stylesheet" media="screen"> <script src="/jquery/jquery.js"></script> <script src="/bootstrap/3.0.0/js/bootstrap.min.js"></script> <link href="/font-awesome/4.0.1/css/font-awesome.min.css" rel="stylesheet"> <?php } else { ?> <link href="//netdna.bootstrapcdn.com/bootswatch/3.0.0/spacelab/bootstrap.min.css" rel="stylesheet" media="screen"> <script src="//code.jquery.com/jquery.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.min.css" rel="stylesheet"> <?php } ?> <link rel="stylesheet" href="<?php echo url('/css/customize.css'); ?> " type="text/css">