Example #1
0
 public static function GetInstance()
 {
     global $USER;
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
         self::$codes = new CHotKeysCode();
         self::$optUse = COption::GetOptionString('main', "use_hot_keys", "Y") == "Y";
         self::$ExpImpFileName = "hk_export_" . $_SERVER['HTTP_HOST'] . ".srl";
         self::$cacheId = "b_hot_keys" . $USER->GetID() . LANGUAGE_ID;
         if (self::$optUse) {
             self::$instance->LoadToCache();
         }
     }
     return self::$instance;
 }