本文整理汇总了PHP中Ak::getSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP Ak::getSetting方法的具体用法?PHP Ak::getSetting怎么用?PHP Ak::getSetting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ak
的用法示例。
在下文中一共展示了Ak::getSetting方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _decodeToken
/**
* Decodes a token generated with encodeToken and returns an array of options
*
* @param string $token token options
* @param bool $url_decode should it URL decode the token true by default
* @return array Array of options for the authentication token
*/
function _decodeToken($token)
{
return (array) Ak::fromJson(Ak::blowfishDecrypt(base64_decode($token), Ak::getSetting('admin', 'token_key')));
}
示例2: urlFor
/**
* This is the url_for version for helpers and emails.
*
* As we do not have the context of a host being requested, we need to know
* the base_url like http://example.com in oder to add it to the generated URL
*/
public function urlFor()
{
$args = func_get_args();
$base_url = '';
if (isset($args[0]['base_url'])) {
$base_url = rtrim(preg_replace('/^(?!http[s]?:\\/\\/)(.+)/', 'http://$1', strstr($args[0]['base_url'], '.') ? $args[0]['base_url'] : Ak::getSetting('mailer', 'base_url', AK_HOST)), '/');
unset($args[0]['base_url']);
}
unset($args[0]['only_path'], $args[0]['base_url']);
return $base_url . call_user_func_array(array('Ak', 'toUrl'), $args);
}
示例3: getTestTitle
static function getTestTitle($options)
{
AkConfig::setOption('testing_url', AK_TESTING_URL);
AkConfig::setOption('memcached_enabled', AkMemcache::isServerUp());
AkUnitTestSuite::checkIfTestingWebserverIsAccesible($options);
$dabase_settings = AK_DATABASE_SETTINGS_NAMESPACE == 'database' ? Ak::getSetting('database', 'type') : AK_DATABASE_SETTINGS_NAMESPACE;
return "PHP " . phpversion() . ", Environment: " . AK_ENVIRONMENT . ", Database: " . $dabase_settings . (AkConfig::getOption('memcached_enabled', false) ? ', Memcached: enabled' : '') . (AkConfig::getOption('webserver_enabled', false) ? ', Testing URL: ' . AkConfig::getOption('testing_url') : ', Testing URL: DISABLED!!!') . "\n" . "Error reporting set to: " . AkConfig::getErrorReportingLevelDescription() . "\n" . trim($options['description']) . '';
}
示例4: _decodeToken
/**
* Decodes a token generated with encodeToken and returns an array of options
*
* @param string $token token options
* @param bool $url_decode should it URL decode the token true by default
* @return array Array of options for the authentication token
*/
function _decodeToken($token)
{
return (array)Ak::fromJson(Ak::blowfishDecrypt(base64_decode($token), Ak::getSetting(AK_DEFAULT_ADMIN_SETTINGS, 'token_key')));
}
示例5: decodeToken
/**
* Decodes a token generated with encodeToken and returns an array of options
*
* @param string $token token options
* @param bool $url_decode should it URL decode the token true by default
* @return array Array of options for the authentication token
*/
static function decodeToken($token)
{
return (array) Ak::fromJson(Ak::blowfishDecrypt(base64_decode($token), Ak::getSetting(self::getSettingsNamespace(), 'token_key')));
}