Re: Re: cvs: pear /XML_Transformer Transformer.php package.xml /XML_Transformer/Transformer/Driver OutputBuffer.php
| From: | Sebastian Bergmann | Date: | Tue, 09 Sep 2003 05:57:51 +0000 |
| Subject: | Re: Re: cvs: pear /XML_Transformer Transformer.php package.xml /XML_Transformer/Transformer/Driver OutputBuffer.php | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21223@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
> function debug($msg,$level=1) {
> if ($_GLOBALS['_DB_DATAOBJECT']['debug'] => $level) {
> .... print ...
> }
> }
> but since it had to do the method call to debug, before printing
> anything out
I don't want to duplicate the check in _debug() everywhere I trigger
a debugging message. XML Transformer's debugging mechanism is not
limited to a simple boolean flag like $this->_debug that needs to be
checked but also has debug message filtering.
XML Transformer's old _debug() implementation was slower because of the
sprintf() calls that were executed even when debugging was disabled.
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/