Re: [Template] Design issues

From: Date: Sat, 12 Jun 2004 15:29:27 +0000
Subject: Re: [Template] Design issues
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30569@lists.php.net to get a copy of this message
do something like isbool($this->option['debug']) => echo the message otherwise: - load a debug provider... I've already made error handling another provider... = default: return a testable error = default: DIE errors emited by anything kill things = option: convert DIE errors to RETURN or THROW I've no idea the pros/cons of doing anything with images.. - I can tell you from experience that if you dont see anything on the screen when developing , it can take a while to discover bugs.. (live servers tend to depend on syslog) Regards Alan
function debug($string) { if (!$this->option['debug']) {
        return;
} elseif (is_null($this->_log)) {
        if (is_object($this->option['debug'])) {
             // To allow the user to pass existing log object
             $this->_log =& $this->option['debug'];
        } else {
             // Not fully worked out yet...
             $this->_log =& Log::Singleton($this->option['debug']->type, $this->option['debug']->conf);
        }
} $this->_log->log($string); } Or, we could just simply ask for a Log object in the "debug" option... even easier for us and open... That object would just need a "log()" method... -Philippe
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.dev (#30569) next »