RE: [PEAR-DEV] HTML/Form.php patch

From: Date: Mon, 26 Nov 2001 18:02:36 +0000
Subject: RE: [PEAR-DEV] HTML/Form.php patch
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3118@lists.php.net to get a copy of this message
shouldn't, unless a user was calling private methods directly to print out partial forms. previous usage was to build your form with the add{form-element-ere}()methods, then call display(), which loops through your form elements, printing out the html *as it goes*. with the patch, usage is the exactly the same way as before: you build your form, then call display(). the change is internal, where display() first calls getHTML() (which loops through your form elements, builds the html into the buffer), and *then* prints out the buffer contents. if you wish to get *just* the html, you can call getHTML() directly, without calling display(). > -----Original Message----- > From: Martin Jansen [mailto:mail@martin-jansen.de] > Sent: Monday, November 26, 2001 12:31 PM > To: Dietrich Ayala > Cc: pear-dev@lists.php.net > Subject: Re: [PEAR-DEV] HTML/Form.php patch > > > On Mon, 26 Nov 2001 11:38:01 -0500, Dietrich Ayala wrote: > > >currently form.php prints directly from it's methods while building > >the form, making it unusable with most template systems. > > > >this patch: > > > >- adds method addToBuffer() which adds output to a class level var $buffer > > > >- replaces all 'print' calls with $this->addToBuffer() calls > > > >- renames display() to getHTML() > > > >- makes display() a method that calls getHTML() and prints it > > Doesn't this break backwards compatibility? > > - Martin > > -- > Martin Jansen, <mail@martin-jansen.de> > http://www.martin-jansen.de/ > > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net > For additional commands, e-mail: pear-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

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