Re: PEAR_Autoloader
| From: | LingWitt at insightbb dot com | Date: | Tue, 28 Oct 2003 14:59:27 +0000 |
| Subject: | Re: PEAR_Autoloader | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23080@lists.php.net to get a copy of this message | ||
Which PHP 5 extension does this?
On Tuesday, Oct 28, 2003, at 02:01 America/New_York, Alan Knowles wrote:
LingWitt@insightbb.com wrote:The Autoloader.php file requires the overload extension, which is not applicable in PHP 5. My own classes use the PEAR_Autoloader class, and thus I still need it unless I rewrite it. I have found that by removing all references to the overload extension and by modifying the __call() method to __call($method, $args), the code works perfectly with PHP 5. I don't know how to submit patches or the like, so I'm blatantly telling you my findings. Tell me what you think.Never looked at the Autoloader.. - but it appears to do most of what the aggregate extension does (along what appears to be a broken autoloader feature) I could see a number of flaws with it.. (apart from the fact it would make code v.difficult to read) - addAggregateObject($classname) .. - using a preg_replace and puts in '_' for file sperators to include filenames..?? Is it actually used anywhere? - It seems a little obtuse (it's called an autoloader where as it really is an aggregator with some limited loading ability...) perhaps it could be renamed to PEAR_Autoload, and just provide the ability to autoload classes.. and leave the aggregation upto the PHP extension in PHP5???? (does that actually work yet?) Regards alan -- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com