本文整理汇总了PHP中Debugger::addLine方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::addLine方法的具体用法?PHP Debugger::addLine怎么用?PHP Debugger::addLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debugger
的用法示例。
在下文中一共展示了Debugger::addLine方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: detect
/**
* Detect available adapter
* @return string
*/
private static function detect()
{
static $autoDetected = null;
if ($autoDetected) {
return $autoDetected;
}
if (!Debugger::isCachesEnabled()) {
Debugger::addLine('Caching disabled by Debug Mode settings');
return self::INST_NONE;
}
if (Cache\APCu::isAvailable()) {
Debugger::addLine('Auto-detected cache type: APCu');
return $autoDetected = self::INST_APCU;
}
if (Cache\XCache::isAvailable()) {
Debugger::addLine('Auto-detected cache type: XCache');
return $autoDetected = self::INST_XCACHE;
} elseif (Cache\MemCached::isAvailable()) {
Debugger::addLine('Auto-detected cache type: MemCached');
return $autoDetected = self::INST_MEMCACHED;
} elseif (Cache\MemCache::isAvailable()) {
Debugger::addLine('Auto-detected cache type: Memcache');
return $autoDetected = self::INST_MEMCACHE;
// } elseif (Cache\SharedMemory::isAvailable()) {
// Debugger::getInstance()->addLine('Auto-detected cache type: Shared Memory');
// return $autoDetected = self::INST_SHAREDMEM;
}
Debugger::addLine('No cache detected');
return $autoDetected = self::INST_NONE;
}
示例2: run
/**
* Trigger all events one by one
*/
public static function run()
{
self::init();
foreach (self::$events as $type => $foo) {
Debugger::addEventLine('Event ' . $type . ' started');
self::start($type);
}
Debugger::addLine('Done running events');
if (Envi::getMode() == 'web') {
Debugger::checkSlow();
}
}