Re: autoload, include_once naming conventions
| From: | Lukas Smith | Date: | Thu, 17 Mar 2005 22:16:10 +0000 |
| Subject: | Re: autoload, include_once naming conventions | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-36734@lists.php.net to get a copy of this message | ||
Stephan Schmidt wrote:
Hi, Lukas Smith schrieb:Ok, then your __autoload() implementation is pointless. The point of __autoload() is to centralize the loading of code. We will not be able to support people that want to use the include_path for some third party code, __autoload() for some other, and some other hacks for another.I dont agree. Lets not add more than just ensuring that the code is loaded here. Anything else should be left to __autoload() because that is under the control over the user and he can choose the complexity. I also dont think that we should start implementing our own callback mechanism here.That means you'd like to direct the call to __autoload() if it exists and if it doesn't just do a include 'Path/To/Class.php'? If you do this, it will break my scripts, as I'm using __autoload() to load some non-PEAR classes of my own framework. The feature only will be useful if it does the following:
And I still can't see the disadvantage of adding if (is_callable($class, '__static')) { call_user_func(array($class, '__static')); }The disadvantage is that we are no longer KISS. We shove functionality down peoples throat. The intention of my proposal was to empower the user and thereby give the users more control and an opportunity to enhance performance. What you are proposing is a definate opportunity to kill performance. Maybe my proposal was too late. Maybe its not possible to do anything like this without opening the flood gates. So it goes. regards, Lukas