當前位置: 首頁>>代碼示例>>PHP>>正文


PHP kernel::Configuration方法代碼示例

本文整理匯總了PHP中kernel::Configuration方法的典型用法代碼示例。如果您正苦於以下問題:PHP kernel::Configuration方法的具體用法?PHP kernel::Configuration怎麽用?PHP kernel::Configuration使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在kernel的用法示例。


在下文中一共展示了kernel::Configuration方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: signData

 /**
  * Gernerates the signed Data
  *
  * @param string $url
  * @return string
  */
 public static function signData($url)
 {
     //http://us.battle.net/api/wow/realm/status
     if (preg_match("/https/i", strtolower($url))) {
         $url = substr($url, 21);
     } else {
         $url = substr($url, 20);
     }
     return base64_encode(hash_hmac('sha1', utf8_encode(kernel::Configuration("authenticationPrivateKey")), self::stringToSign($url)));
 }
開發者ID:nirnanaaa,項目名稱:battleRest,代碼行數:16,代碼來源:auth.php

示例2: curlRequest

 public static function curlRequest($url)
 {
     if (kernel::Configuration("apcSupport") || kernel::Configuration("memcachedSupport")) {
         if (process::check($url)) {
             return process::fetch($url);
         } else {
             return process::store($url, self::uncachedRequest($url));
         }
     } else {
         return self::uncachedRequest($url);
     }
 }
開發者ID:nirnanaaa,項目名稱:battleRest,代碼行數:12,代碼來源:request.php

示例3: store

 public static function store($var, $value)
 {
     if (self::support() == "apc") {
         if (self::apcSupport()) {
             apc_store($var, $value, kernel::Configuration("cacheSaveTime"));
             return apc_fetch($var);
         } else {
             kernel::throwException("APC enabled but not available");
             return false;
         }
     } elseif (self::support() == "memcached") {
         if (self::memcachedSupport) {
             memcached::set($var, $value);
             return memcached::get($var);
         } else {
             kernel::throwException("Memcached enabled but not available");
             return false;
         }
     }
 }
開發者ID:nirnanaaa,項目名稱:battleRest,代碼行數:20,代碼來源:process.php

示例4: requestParamsSet

 /**
  * Sets the parameters after calling the getter
  *
  * If Get is called it sets basic parameters
  *
  * @return void
  */
 private function requestParamsSet()
 {
     if (!isset($this->_options['region'])) {
         $this->_options['region'] = kernel::Configuration("standardRegion");
     }
     if (!isset($this->_options['sslSupport'])) {
         $this->_options['sslSupport'] = kernel::Configuration("sslSupport");
     }
     if (!isset($this->_options['apcCaching'])) {
         $this->_options['apcCaching'] = kernel::Configuration("apcSupport");
     }
     if (!isset($this->_options['memCaching'])) {
         $this->_options['memCaching'] = kernel::Configuration("memcachedSupport");
     }
     if (!isset($this->_options['softfail'])) {
         $this->_options['softfail'] = kernel::Configuration("softfail");
     }
     $this->dynamicModules();
 }
開發者ID:nirnanaaa,項目名稱:battleRest,代碼行數:26,代碼來源:REST.php

示例5: set

 public static function set($key, $value)
 {
     self::connect()->set($key, $value, false, kernel::Configuration("cacheSaveTime"));
 }
開發者ID:nirnanaaa,項目名稱:battleRest,代碼行數:4,代碼來源:memcached.php


注:本文中的kernel::Configuration方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。