Re: Re: Your opinion about QuickForm2 API
| From: | Justin Patrin | Date: | Wed, 18 Apr 2007 15:37:15 +0000 |
| Subject: | Re: Re: Your opinion about QuickForm2 API | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46279@lists.php.net to get a copy of this message | ||
On 4/18/07, Bertrand Mansion <golgote@mamasam.com> wrote:
Le 18 avr. 07 à 13:39, Antti Holvikari a écrit : On 4/16/07, Gregory Beaver <greg@chiaraquartet.net> wrote:IIRC to cache a form all you'd need to do (in PHP5) is store the form object in the session and define an __autoload which will load the correct classes. For PHP4 you'd have to store a list of the classes used and load the classes manually when you wanted to use the cached form. -- Justin PatrinThis is *exactly* what Solar[1] does. You can load[2] forms (or rather, form "hints", which are just AAs) from SQL table objects and from XML files and hand them to your "view". This is *made* for MVC. If what you describe is exactly how Solar works, then it's not a cache... You will have to create the form from the ground up. There will be no speed benefits, quite the opposite.Another feature request I've had that may be possible is to integrate some kind of forms creation cache, so that the form need only be created programmatically once, and then it can on subsequent requests be quickly recreated from a disk or database cache, skipping all the expensive method calls, but this is a separate question than the one you asked, let me know if you'd like a feature request opened on this.