本文整理匯總了PHP中config::has方法的典型用法代碼示例。如果您正苦於以下問題:PHP config::has方法的具體用法?PHP config::has怎麽用?PHP config::has使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類config
的用法示例。
在下文中一共展示了config::has方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: install
public function install()
{
actions::invoke('database', array('initialize'));
actions::invoke('database', array('import'));
if (config::has('installer.class')) {
$ic = config::get('installer.class');
$c = new $ic();
$c->install();
}
}
示例2: __construct
function __construct($url)
{
if (config::has('lepton.services.thumbalizer.apikey')) {
$this->apikey = config::get('lepton.services.thumbalizer.apikey');
}
$this->cachedir = config::get('lepton.services.thumbalizer.cachedir', base::basePath() . 'cache');
if (!file_exists($this->cachedir)) {
throw new ConfigurationException("Thumbalizer cache directory not found, define with lepton.services.thumbalizer.cachedir");
}
}
示例3: dbprefs
/**
* @description Saving/loading of database backed settings
*/
function dbprefs()
{
if (!config::has('lepton.db.default')) {
$this->skip();
}
$tf = $this->getTempFile();
$s = new DbPrefs('prefstest');
$this->assertNotNull($s);
$s->foo = 'bar';
unset($s);
$s = new DbPrefs('prefstest');
$this->assertNotNull($s);
$this->assertEquals($s->foo, 'bar');
$s->destroy();
unset($s);
// unlink('/tmp/jsonprefs.tmp');
}
示例4: class_inherits
if (php_sapi_name() == 'cli') {
ModuleManager::load('lepton.base.application');
}
function class_inherits($cn, $base)
{
if (!class_exists($cn)) {
return false;
}
$rc = new ReflectionClass($cn);
$pc = $rc->getParentClass();
if ($pc) {
return $pc->name == $base;
}
return false;
}
if (config::has('lepton.db.tableprefix')) {
define('LEPTON_DB_PREFIX', config::get('lepton.db.tableprefix'));
} else {
define('LEPTON_DB_PREFIX', '');
}
class LeptonInstanceScopeWatcher
{
function __destruct()
{
Console::debugEx(LOG_BASIC, '(destructor)', "Memory allocated at shutdown: %0.3f KB (Total used: %0.3f KB, By code: %0.3f KB)", memory_get_usage() / 1024 / 1024, memory_get_usage(true) / 1024 / 1024, (memory_get_usage(true) - SYSTEM_INITIAL_MEMORY_USE) / 1024 / 1024);
}
}
$__leptoninstancescope = new LeptonInstanceScopeWatcher();
using('s2s.requesthandler');
using('lepton.utils.rtoptimization');
RuntimeOptimization::enable();
示例5: hasValue
public function hasValue($name)
{
return config::has('input.default.' . $name);
}
示例6: has
public static function has($name)
{
return config::has($name);
}