Re: A question to __autoload() fanboys

From: Date: Mon, 01 Aug 2005 11:31:33 +0000
Subject: Re: A question to __autoload() fanboys
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39074@lists.php.net to get a copy of this message
On 1.8.2005 12:47 Uhr, Alexey Borzov wrote: > Hi, > > Since the flame [1] about the evil QuickForm developers not willing to > fix the bugs in other peoples's code [2] somehow died down I'd like to > ask a new technical question. > > I was going through QuickForm thinking on whether to actually fix the > "bug" #3197 and found a following code fragment in > HTML_QuickForm_Renderer_ITStatic::_getTplBlock(): > > if (is_a($this->_tpl, 'html_template_sigma')) { > ... code for HTML_Template_Sigma ... > } else { > ... code for HTML_Template_IT ... > } > > OK, I *can* fix the case of 'html_template_sigma' here, but the problem > is the following: if a person uses HTML_Template_IT package he most > probably does not have HTML_Template_Sigma installed (and vice versa), > thus trying to autoload the class will fail! How should I fix this problem? > > 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 > > > [1] > http://marc.theaimsgroup.com/?l=pear-dev&m=112239979300570&w=2 > [2] http://pear.php.net/bugs/bug.php?id=3197 > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

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