Re: PEAR.php to PHP5

From: Date: Thu, 01 Jul 2004 18:34:35 +0000
Subject: Re: PEAR.php to PHP5
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31462@lists.php.net to get a copy of this message
This code is nice - and once php4 is completely forgotten, it would handle the issues PEAR_ErrorStack seeks to solve wonderfully. the package attribute could be handled simply by instanceof and extension. sub-packaging could be handled by extension hierarchies. error message and code are obviously handled already. Adding context generation (NOT handled in your example) and error message generation from context information (NOT handled - getMessage() is a final method, and can't be overridden) would be trivial. However, until PHP4 is extinct, the package is more of a curiosity. I would like to see PHP4 go extinct rather quickly, so perhaps we could work with the idea Tomas has, and give it all of the missing features I describe above? This could then be a recommendation for php5 systems (*). Greg (*) A PHP5-system does not use ANY legacy code. a package that relied upon Tomas's error handling system would simply not work with PEAR_ErrorStack, or any other PHP4-compatible code. Tomas V.V.Cox wrote:
Hi, Was played this night on how to get the PEAR base class revamped to be php5 compliant and btw making it easier to use, more flexible, exceptions, etc. without loosing the automatic error handling or needing to touch any line of most pear classes. Take a look at the examples at the bottom, Tomas V.V.Cox PS.- Will the attach be stripped? Let's see :)


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