コード例 #1
0
ファイル: Settings.php プロジェクト: vitaliy7711/pdnsops
 private static function initCache()
 {
     Settings::$cache = array();
     $settings = Setting::model()->findAll();
     foreach ($settings as $setting) {
         Settings::$cache[$setting->key] = $setting->value;
     }
 }
コード例 #2
0
ファイル: settings.php プロジェクト: AlexanderBrevig/OS.js-v2
 public static function get()
 {
     if (!self::$cache) {
         $json = file_get_contents(ROOTDIR . "/src/server/settings.json");
         $json = str_replace("%DROOT%", ROOTDIR, $json);
         self::$cache = (array) json_decode($json, true);
     }
     return self::$cache;
 }
コード例 #3
0
ファイル: settings.php プロジェクト: genecyber/OS.js-v2
 public static function get()
 {
     if (!self::$cache) {
         $json = file_get_contents(ROOTDIR . "/src/server/settings.json");
         $root = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? str_replace('\\', '/', ROOTDIR) : ROOTDIR;
         $json = str_replace("%DROOT%", $root, $json);
         self::$cache = (array) json_decode($json, true);
     }
     return self::$cache;
 }
コード例 #4
0
ファイル: settings.php プロジェクト: bobkingdom/OS.js-v2
    public static function get()
    {
        if (!self::$cache) {
            $json = <<<EOJSON

%JSON%

EOJSON;
            self::$cache = (array) json_decode($json, true);
        }
        return self::$cache;
    }
コード例 #5
0
ファイル: settings.php プロジェクト: JamesLinus/OS.js-v2
    public static function get()
    {
        if (!self::$cache) {
            $json = <<<EOJSON

%JSON%

EOJSON;
            $root = dirname(dirname(__DIR__));
            $json = str_replace("%DROOT%", $root, $json);
            self::$cache = (array) json_decode($json, true);
        }
        return self::$cache;
    }