Re: PHP 5 Question about OO
| From: | Jochem Maas | Date: | Thu, 02 Jun 2005 15:20:28 +0000 |
| Subject: | Re: PHP 5 Question about OO | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-216238@lists.php.net to get a copy of this message | ||
Jason Barnett wrote:
Jochem Maas wrote:...Richard Lynch wrote:On Wed, June 1, 2005 3:53 am, Marcus Bointon said:On 1 Jun 2005, at 11:38, Jochem Maas wrote:
agreed, but as you point out - the devil is in the details. :-)I opened up a feature request for this very topic a while back. The __autoload function should just register user-defined functions and store those func names in a stack so that (in turn) each function can require the appropriate file. If the first registered function fails to load the class then __autoload tries the next registered fucntion and so on until all of the registered functions have been tried. At this point if __autoload fails then we E_ERROR out explaining that __autoload could not load the class definition. As far as I can tell this is the cleanest solution that has been provided, but there is some disagreement over some of the details on this approach.
<just_kidding>Life would be so much easier if everyone just did things like the PEAR coders do</just_kidding><say-it-like-a-pirate>that be fightin' talk m'friend ;-)</say-it-like-a-pirate>