Re: Re: cvs: pear-core /PEAR ErrorStack5.php Warning.php
| From: | Greg Beaver | Date: | Sat, 04 Sep 2004 04:05:18 +0000 |
| Subject: | Re: Re: cvs: pear-core /PEAR ErrorStack5.php Warning.php | ||
| References: | 1 2 | Groups: | php.pear.cvs php.pear.core |
| Request: | Send a blank email to pear-cvs+get-23616@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
I was wondering if the WarningStack should actually be an observer of the Warning object. - that way under normal operation, you dont end up filling up memory with excessive amount of old warnings. The principle being, the Warning object would only store the last Warning, eg. $warn = PEAR_Warning::getLast(); or maybe $warn = PEAR_Warning::getLast('MyPackage'); (in which case it would store per/class/package warnings?) if you want to monitor warnings you would do something like: require_once 'PEAR/WarningStack.php'; PEAR_WarningStack::monitor(); I guess that would mean the 'standalone' method would be a little simpler. Reards AlanHi, Possibly, but I think with the current system (no warnings will be stored at all unless you're looking for them) it might be even better. What do you think? Greg