本文整理匯總了PHP中Zend_Log::hasLogger方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Log::hasLogger方法的具體用法?PHP Zend_Log::hasLogger怎麽用?PHP Zend_Log::hasLogger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Log
的用法示例。
在下文中一共展示了Zend_Log::hasLogger方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Object constructor.
*
* Validates the data source and enables debug logging if so configured.
*
* @param Zend_Pdf_FileParserDataSource $dataSource
* @throws Zend_Pdf_Exception
*/
public function __construct(Zend_Pdf_FileParserDataSource $dataSource)
{
parent::__construct($dataSource);
/* Enable debug logging if the shared framework debug logger exists.
* See discussion about this special logger in Zend_Log.
*/
if (Zend_Log::hasLogger('ZF')) {
$this->_debug = true;
$this->_debugLog('Parsing font: ' . $dataSource->__toString());
}
$this->fontType = Zend_Pdf_Font::TYPE_UNKNOWN;
}
示例2: setUp
public function setUp()
{
if (!class_exists('Zend_Log') || !class_exists('Zend_Log_Adapter_Null')) {
Zend::loadClass('Zend_Log');
Zend::loadClass('Zend_Log_Adapter_Null');
}
if (!Zend_Log::hasLogger('LOG')) {
Zend_Log::registerLogger(new Zend_Log_Adapter_Null(), 'LOG');
}
$this->_instance->setDirectives(array('logging' => true));
$this->_instance->save('bar : data to cache', 'bar', array('tag3', 'tag4'));
$this->_instance->save('bar2 : data to cache', 'bar2', array('tag3', 'tag1'));
$this->_instance->save('bar3 : data to cache', 'bar3', array('tag2', 'tag3'));
}