/** * 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; }
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')); }