本文整理汇总了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)));
}
示例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);
}
}
示例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;
}
}
}
示例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();
}
示例5: set
public static function set($key, $value)
{
self::connect()->set($key, $value, false, kernel::Configuration("cacheSaveTime"));
}