Re: [Template] Design issues

From: Date: Sat, 12 Jun 2004 15:21:14 +0000
Subject: Re: [Template] Design issues
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30568@lists.php.net to get a copy of this message
function output() { if ($this->options['filters']) { $this->assertProvider('Filters'); return $this->provider['Filters']->output(); }
        .... existing behavior...
} the output() in the filter, can just unset the options['filters'] temporarily and recursivly call.. Regards Alan
} function toString() {
       ob_start();
       if (is_a($r = $this->_output(), 'PEAR_Error')) {
           ob_end_clean();
           return $r;
       }
       if (function_exists('ob_get_clean')) {
           return ob_get_clean();
       } else {
           $data = ob_get_contents();
           ob_end_clean();
           return $data;
       }
} </snip> }
I can live with that very easily. Alan? Two notes: If we stay with PEAR_Error, we'll need a strtolower() on the is_a(). Howeer, I think we ought to move to PEAR_ErrorStack if at all possible.
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

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