cvs: peardoc /en/package/database/db-dataobject-formbuilder intro.xml

From: Date: Sun, 13 Jun 2004 17:45:55 +0000
Subject: cvs: peardoc /en/package/database/db-dataobject-formbuilder intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4401@lists.php.net to get a copy of this message
gurugeek Sun Jun 13 13:45:55 2004 EDT Added files: /peardoc/en/package/database/db-dataobject-formbuilder intro.xml Log: db database object formbuilder initial documentation (yadocs automatically generated) http://cvs.php.net/co.php/peardoc/en/package/database/db-dataobject-formbuilder/intro.xml?r=1.1&p=1 Index: peardoc/en/package/database/db-dataobject-formbuilder/intro.xml +++ peardoc/en/package/database/db-dataobject-formbuilder/intro.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.db.dataobject-formbuilder.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose> A package for building HTML forms from DataObject classes </refpurpose> </refnamediv> <refsect1> <title>DB_DataObject_FormBuilder Description</title> <para> DB_DataObject_FormBuilder will aid you in rapid application development using the packages DB_DataObject and HTML_QuickForm. For having a quick but working prototype of your application, simply model the database, run DataObject createTable script over it and write a script that passes one of the resulting objects to the FormBuilder class. The FormBuilder will automatically generate a simple but working HTML_QuickForm object that you can use to test your application. It also provides a processing method that will automatically detect if an insert() or update( )command has to be executed after the form has been submitted. If you have set up DataObject links.ini file correctly, it will also automatically detect if a table field is a foreign key and will populate a selectbox with the linked tables entries. There are many optional parameters that you can place in your DataObjects.ini or in the properties of your derived classes, that you can use to fine-tune the form-generation, gradually turning the prototypes into fully-featured forms, and you can take control at any stage of the process. Basic usage: <programlisting role="php"> <![CDATA[ $do =& new MyDataObject(); // Insert "$do->get($some_id);" here to edit an // existing object instead of making a new one $fg =& DB_DataObject_FormBuilder::create($do); $form =& $fg->getForm(); if ($form->validate()) { $form->process(array(&$fg,'processForm'), false); $form->freeze(); } $form->display(); ]]> </programlisting> </para> <para> <ulink url="http://www.21st.de/downloads/rapidprototyping.pdf"> The full online documentation is available here</ulink> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.pear.doc (#4401) next »