本文整理汇总了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);
}