本文整理匯總了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();
}
}