cvs: peardoc /en/package/html/html-template-flexy/html-template-flexy getelements.xml

From: Date: Sun, 04 Jun 2006 12:53:30 +0000
Subject: cvs: peardoc /en/package/html/html-template-flexy/html-template-flexy getelements.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7992@lists.php.net to get a copy of this message
danielc Sun Jun 4 12:53:30 2006 UTC Modified files: /peardoc/en/package/html/html-template-flexy/html-template-flexy getelements.xml Log: * Remove whitespace cleanup. http://cvs.php.net/viewcvs.cgi/peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.3 peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.4 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.3 Sun Nov 21 11:16:24 2004 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml Sun Jun 4 12:53:30 2006 @@ -1,12 +1,12 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.getelements"> <refnamediv> <refname>$flexy-&gt;getElements()</refname> <refpurpose>Fetch Dynamic HTML Elements from template </refpurpose> </refnamediv> + <refsynopsisdiv> <funcsynopsis> - <funcprototype> <funcdef>array $flexy-&gt; <function>getElements</function></funcdef> @@ -14,63 +14,56 @@ </funcprototype> </funcsynopsis> </refsynopsisdiv> + <refsect1 id="package.html.html-template-flexy.html-template-flexy.getelements.desc"> &title.desc; <para> All Form elements, FORM, INPUT, SELECT and any HTML tag that includes the attribute flexy:dynamic Is converted into HTML_Template_Flexy_Element's and stored serialized in the same folder as the Compiled flexy template. - - </para> - <para> - + </para> + <para> You can use this array to make changes to these elements or find out what form elements - exist on a page. - </para> - <para> - Note: you should put the modified result as the $elements argument of &gt;outputObject(), you do not however + exist on a page. + </para> + <para> + Note: you should put the modified result as the $elements argument of &gt;outputObject(), you do not however have to fetch the elements to assign them, you can just create blank elements, and merge them. - </para> - - - - - </refsect1> - + </para> + </refsect1> + <refsect1 id="package.html.html-template-flexy.html-template-flexy.getelements.return"> &title.returns; <para> - <parameter>array</parameter> - of Elements contained within the template. (or an empty array if + <parameter>array</parameter> - of Elements contained within the template. (or an empty array if no form/dynamic elements are used) </para> - </refsect1> - - - + </refsect1> + <refsect1 id="package.html.html-template-flexy.html-template-flexy.getelements.note"> &title.note; &note.notstatic; - </refsect1> - + </refsect1> + <refsect1 id="package.html.html-template-flexy.html-template-flexy.getelements.example"> &title.example; <example> <title>Introspecting a template</title> <programlisting role="php"> - <![CDATA[ + <![CDATA[ $form = new HTML_Template_Flexy(); $form->compile($this->masterTemplate); print_r($form->getElements()); - -]]> + +]]> </programlisting> </example> <example> <title>template example</title> <programlisting role="html"> - <![CDATA[ + <![CDATA[ <BODY> <FORM name="XXXX"> <INPUT name="yyy"> @@ -78,35 +71,35 @@ <OPTION value="aaaa">AAAAA</OPTION> </SELECT> </FORM> -</BODY> +</BODY> -]]> +]]> </programlisting> </example> - + <example> <title>template compiled</title> <programlisting role="html"> - <![CDATA[ - + <![CDATA[ + <BODY> <?php echo $this->elements['XXXX']->toHtmlnoClose();?> <?php echo $this->elements['yyy']->toHtml();?> <?php echo $this->elements['zzz']->toHtml();?> </form> </BODY> - -]]> + +]]> </programlisting> </example> - <example> + <example> <title>output from the Introspection</title> <programlisting> - <![CDATA[ - + <![CDATA[ + Array ( [XXXX] => html_template_flexy_element Object @@ -116,17 +109,17 @@ ( [name] => XXXX ) - + [children] => Array ( ) - + [override] => [prefix] => [suffix] => [value] => ) - + [yyy] => html_template_flexy_element Object ( [tag] => input @@ -134,17 +127,17 @@ ( [name] => yyy ) - + [children] => Array ( ) - + [override] => [prefix] => [suffix] => [value] => ) - + [zzz] => html_template_flexy_element Object ( [tag] => select @@ -152,11 +145,11 @@ ( [name] => zzz ) - + [children] => Array ( [0] => - + [1] => html_template_flexy_element Object ( [tag] => option @@ -164,42 +157,37 @@ ( [value] => aaaa ) - + [children] => Array ( [0] => AAAAA ) - + [override] => [prefix] => [suffix] => [value] => ) - + [2] => - + ) - + [override] => [prefix] => [suffix] => [value] => ) - + ) -]]> +]]> </programlisting> </example> + </refsect1> +</refentry> - - </refsect1> - - - - - </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -218,4 +206,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> +-->

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