Re: PEAR_Autoloader
| From: | Jesus M. Castagnetto | Date: | Tue, 28 Oct 2003 21:42:28 +0000 |
| Subject: | Re: PEAR_Autoloader | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23094@lists.php.net to get a copy of this message | ||
The aggregate functions are no more (in PHP 5):
http://marc.theaimsgroup.com/?l=phpdoc&m=105678544210196&w=2
See also the thread that starts here:
http://marc.theaimsgroup.com/?l=php-dev&m=105659237905014&w=2
Basically the runtime aggregation is superseded by interfaces. Even
though I liked the idea (and wrote the docs for the Andrei's aggregate
functions), they felt a little kludgy but potentially very powerful (and
confusing if not used well).
Interfaces would be a better choice, easy to wrap one's mind around that rather
than an undetermined dynamic binding.
--- Alan Knowles <alan@akbkhome.com> wrote:
> http://www.php.net/aggregate
>
> but I've no idea what the status is in PHP5 (I heard that it needed
> fixing at one point..)
>
> Regards
> Alan
>
> LingWitt@insightbb.com wrote:
>
> > 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
> >>
> >
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--
Jesus M. Castagnetto (jcastagnetto@yahoo.com)
Research: http://metallo.scripps.edu/
Personal: http://www.castagnetto.org/
PEAR stuff: http://pear.php.net/user/jmcastagnetto
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/