Re: A question to __autoload() fanboys

From: Date: Mon, 01 Aug 2005 12:36:35 +0000
Subject: Re: A question to __autoload() fanboys
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39077@lists.php.net to get a copy of this message
Christian Stocker wrote:
Scott, what will you suggest *this time*?
It won't find the class (or the corresponding file), 'cause it's actually not there... One can handle that in __autoload easily. While asking for html_quickform_group when it's expected to be HTML_QuickForm_group (from Scott's perspective) is a whole different issue. The autoload() implementation doesn't find it, even if the class is somewhere out there. You're really talking about 2 different issues here and you're tone in your mail is ridiculous (again). chregu
This time, I would suggest the same as last time. Use the proper capitalization for the classname and let those using __autoload worry about __autoload. The __autoload implementation I provided earlier will handle this issue just as it did with the HTML_QuickForm_group issue. On a development environment __autoload will fail to find the class and spit out a bunch of error messages but the code will still execute. On a production environment, no one will know that anything has happened. Scott

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