cvs: peardoc /en/package/html html-template-flexy.xml /en/package/html/html-template-flexy configuration.xml intro.xml
/en/package/html/html-template-flexy/element html_template_flexy_element.xml tohtml.xml /en/package/html/html-template-flexy/factory fromarray.xml
/en/package/html/html-template-flexy/html-template-flexy bufferedoutputobject.xml compile.xml getelements.xml outputobject.xml
| From: | Alan Knowles | Date: | Wed, 13 Aug 2003 02:31:29 +0000 |
| Subject: | cvs: peardoc /en/package/html html-template-flexy.xml /en/package/html/html-template-flexy configuration.xml intro.xml /en/package/html/html-template-flexy/element html_template_flexy_element.xml tohtml.xml /en/package/html/html-template-flexy/factory fromarray.xml /en/package/html/html-template-flexy/html-template-flexy bufferedoutputobject.xml compile.xml getelements.xml outputobject.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-1285@lists.php.net to get a copy of this message | ||
alan_k Tue Aug 12 22:31:29 2003 EDT
Modified files:
/peardoc/en/package/html html-template-flexy.xml
/peardoc/en/package/html/html-template-flexy configuration.xml
intro.xml
/peardoc/en/package/html/html-template-flexy/element
html_template_flexy_element.xml
tohtml.xml
/peardoc/en/package/html/html-template-flexy/factory fromarray.xml
/peardoc/en/package/html/html-template-flexy/html-template-flexy
bufferedoutputobject.xml
compile.xml
getelements.xml
outputobject.xml
Log:
more updates to the docs for flexy
Index: peardoc/en/package/html/html-template-flexy.xml diff -u peardoc/en/package/html/html-template-flexy.xml:1.10 peardoc/en/package/html/html-template-flexy.xml:1.11 --- peardoc/en/package/html/html-template-flexy.xml:1.10 Sat Aug 2 09:50:13 2003 +++ peardoc/en/package/html/html-template-flexy.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <sect1 id="package.html.html-template-flexy"> <title>HTML_Template_Flexy</title> @@ -17,12 +17,15 @@ <!-- element! --> &package.html.html-template-flexy.element.html-template-flexy-element; -&package.html.html-template-flexy.element.childrentohtml; + +&package.html.html-template-flexy.element.setvalue; +&package.html.html-template-flexy.element.setoptions; + &package.html.html-template-flexy.element.removeattributes; &package.html.html-template-flexy.element.setattributes; -&package.html.html-template-flexy.element.setoptions; -&package.html.html-template-flexy.element.setvalue; + &package.html.html-template-flexy.element.tohtml; +<!-- &package.html.html-template-flexy.element.childrentohtml; --> &package.html.html-template-flexy.element.tohtmlnoclose; Index: peardoc/en/package/html/html-template-flexy/configuration.xml diff -u peardoc/en/package/html/html-template-flexy/configuration.xml:1.5 peardoc/en/package/html/html-template-flexy/configuration.xml:1.6 --- peardoc/en/package/html/html-template-flexy/configuration.xml:1.5 Sat Aug 2 08:02:08 2003 +++ peardoc/en/package/html/html-template-flexy/configuration.xml Tue Aug 12 22:31:29 2003 @@ -38,6 +38,7 @@ forceCompile = 0 debug = 0 locale = en +compiler = Standard </programlisting> </example> @@ -65,11 +66,12 @@ <programlisting role="php"><![CDATA[ <?php $options = array( - 'templateDir' => '/home/me/Projects/myapplication/templates', - 'compileDir' => '/home/me/Projects/myapplication/compiled_templates', - 'forceCompile' => 0, - 'debug' => 0, - 'locale' = 'en' + 'templateDir' => '/home/me/Projects/myapplication/templates', + 'compileDir' => '/home/me/Projects/myapplication/compiled_templates', + 'forceCompile' => 0, + 'debug' => 0, + 'locale' => 'en', + 'compiler' => 'Standard', ); $template = new HTML_Template_Flexy($options); ?> @@ -158,6 +160,18 @@ <para> Default is 'en' - english. The language use for reading/writing templates. Currently it is only used in the compiled files filename = eg. originalname.html.en.php + </para> + + <para> + Flexy uses get_text() internally if it is installed, and will replace all strings in a HTML page + with the return value of get_text(). - This enables the creation of multilanguage sites with a little less pain. + + </para> + <para> + A file {templatename}.strings.serial is created for each file that is parsed, you can use this with PHP's + unserialize function to retrieve an array of all the strings in a file. (for translating), or just use + the tool xgettext. + </para> </listitem> </varlistentry> Index: peardoc/en/package/html/html-template-flexy/intro.xml diff -u peardoc/en/package/html/html-template-flexy/intro.xml:1.5 peardoc/en/package/html/html-template-flexy/intro.xml:1.6 --- peardoc/en/package/html/html-template-flexy/intro.xml:1.5 Mon Mar 10 17:27:43 2003 +++ peardoc/en/package/html/html-template-flexy/intro.xml Tue Aug 12 22:31:29 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.intro"> <refnamediv> <refname>Introduction</refname> @@ -74,7 +74,7 @@ <title>Typical usage example for <classname>HTML_Template_Flexy</classname></title> <programlisting role="php"> <![CDATA[ - <? +<?php /* configure the application - probably done elsewhere */ require_once 'HTML/Template/Flexy.php'; @@ -91,8 +91,9 @@ var $template = "home.html"; // name of template var $title; // this relates to {title}; var $numbers = array(); // this relates to {numbers} , used with foreach - var $form; // this relates to the form elements object + var $anObject; + var $element = array(); // this is where the elements are stored /* start section - deals with posts, get variables etc.*/ @@ -105,14 +106,21 @@ function start() { + // the title $this->title = "Hello World"; + // store an object. + $this->anObject = new StdClass; - // use a object for the form (or use a dataobject) - $this->form = new StdClass; + // assign a value to a member. + $this->anObject->member = 'Object Member'; + + // create an HTML Element for the form element. + $this->elements['input'] = new HTML_Template_Flexy_Element; + + // assign a value to it + $this->elements['input']->setValue('Hello'); - // assign the default value for the form element. - $this->form->input = "Hello"; for ($i = 1;$i< 5;$i++) { $this->numbers[$i] = "Number $i"; @@ -124,10 +132,16 @@ function output() { $output = new HTML_Template_Flexy(); $output->compile($this->template); - $output->outputObject($this); + $output->outputObject($this,$this->elements); } + function someMethod() { + echo "<B>Hello From A Method</B>"; + } + + + } /* the page controller instantaation - probably done with a factory method in your master page controller class */ @@ -153,26 +167,55 @@ </head> <body> <H1>{title}</H1> + + + <form name="form"> <table> <tr> <td> + <?php /* this will be merged with the date in the $element['input'] object*/ ?> + Input Box: <input name="input"> </td> </tr> - <!-- note here the use for foreach as an attribute value --> + <?php /* note here the use for flexy:foreach as an attribute value */ ?> - <tr foreach="numbers,number,string"> + <tr flexy:foreach="numbers,number,string"> <td> + + <?php /* note here the use for flexy:foreach as an attribute value */ ?> + <a href="mypage.html?id=%7Bnumber%7D">{string}</a> </td> </tr> </table> + + <?php /* there is some limited support for array access */ ?> + + this is number 2 : {numbers[2]} + + + <?php /* note that full stops seperate object and variables or methods */ ?> + + This is a {anObject.member} + + <?php /* you can call methods of the object */ ?> + + {someMethod()} + + <?php /* by default everything is htmlspecialchar escaped use the modifier :h to prevent this. */ ?> + + {someMethod():h} + </body> </html> + +<?php /* I've used php for comments here as HTML comments didnt work when generating the +manual .. - you dont have to use them - it has nothing to do with the template engine */ ?> ]]> </programlisting> @@ -182,9 +225,11 @@ </para> <example> <title>Output of example for <classname>HTML_Template_Flexy</classname></title> - <programlisting role="php"> + <programlisting role="html"> <![CDATA[ + + Hello World Input Box : [Hello ] @@ -193,7 +238,15 @@ Number 3 Number 4 - +this is number 2 : Number 2 + + +This is a member Variable + +<B>Hello From A Method</B> + +Hello From A Method + ]]> </programlisting> </example> Index: peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml diff -u peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml:1.4 peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml:1.5 --- peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml:1.4 Sat Aug 2 21:23:16 2003 +++ peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> @@ -23,8 +23,8 @@ <refsect1 id="package.html.html-template-flexy.element.html-template-flexy-element.desc"> &title.desc; <para> - Flexy uses a single lightweight classe to represent All HTML Tags, All the variables of the class are - public, and you are encouraged to use them. And the methods provide common + Flexy uses a single lightweight class to represent All HTML Tags, All the variables of the class are + public, and you are encouraged to use them. And the methods provide generic assignment and conversion abilities. </para> </refsect1> @@ -71,7 +71,7 @@ <term> <type>string</type> - <parameter>element->tag</parameter> + <parameter>$element->tag</parameter> </term> <listitem> <para> Index: peardoc/en/package/html/html-template-flexy/element/tohtml.xml diff -u peardoc/en/package/html/html-template-flexy/element/tohtml.xml:1.3 peardoc/en/package/html/html-template-flexy/element/tohtml.xml:1.4 --- peardoc/en/package/html/html-template-flexy/element/tohtml.xml:1.3 Sat Aug 2 10:05:49 2003 +++ peardoc/en/package/html/html-template-flexy/element/tohtml.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.html.html-template-flexy.element.tohtml"> <refnamediv> <refname>$element->toHtml</refname> @@ -6,11 +6,9 @@ </refnamediv> <refsynopsisdiv> <funcsynopsis> - <funcsynopsisinfo> - require_once 'Flexy/Element.php'; - </funcsynopsisinfo> + <funcprototype> - <funcdef>string <function>HTML_Template_Flexy_Element::toHtml</function></funcdef> + <funcdef>string $element-><function>toHtml</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> @@ -18,7 +16,11 @@ <refsect1 id="package.html.html-template-flexy.element.tohtml.desc"> &title.desc; - ¬documented; + <para> + returns the HTML to represent the object. If you wish to implement your own element, you only need + to implement this method, and assign it to the element array.. + + </para> </refsect1> <refsect1 id="package.html.html-template-flexy.element.tohtml.throws"> Index: peardoc/en/package/html/html-template-flexy/factory/fromarray.xml diff -u peardoc/en/package/html/html-template-flexy/factory/fromarray.xml:1.4 peardoc/en/package/html/html-template-flexy/factory/fromarray.xml:1.5 --- peardoc/en/package/html/html-template-flexy/factory/fromarray.xml:1.4 Thu Aug 7 11:21:09 2003 +++ peardoc/en/package/html/html-template-flexy/factory/fromarray.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="package.html.html-template-flexy.factory.fromarray"> <refnamediv> <refname>$factory->fromArray()</refname> @@ -59,6 +59,7 @@ <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> + <refsect1 id="package.html.html-template-flexy.factory.fromarray.note"> &title.note; <para> Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml:1.5 peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml:1.6 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml:1.5 Sat Aug 2 08:02:08 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,14 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.bufferedoutputobject"> <refnamediv> - <refname>->bufferedOutputObject()</refname> + <refname>$flexy->bufferedOutputObject()</refname> <refpurpose>Merges a controller object with the template and returns the result</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> - + <funcprototype> - <funcdef>void - <function>->bufferedOutputObject</function></funcdef> + <funcdef>void $flexy-><function>bufferedOutputObject</function></funcdef> <paramdef>object <parameter>$controllerObject</parameter></paramdef> <paramdef>array <parameter><optional>$elements</optional></parameter></paramdef> </funcprototype> Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml:1.5 peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml:1.6 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml:1.5 Mon May 12 16:15:50 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,15 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.compile"> <refnamediv> - <refname>->compile()</refname> + <refname>$flexy->compile()</refname> <refpurpose>Converts a template from markup to PHP if required</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>void - <function>->compile</function></funcdef> + <funcdef>void $flexy-> + <function>compile</function></funcdef> <paramdef>string <parameter>$template</parameter></paramdef> </funcprototype> 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.1 peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.2 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.1 Sat Aug 2 08:02:54 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,15 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.getelements"> <refnamediv> - <refname>->getElements()</refname> + <refname>$flexy->getElements()</refname> <refpurpose>Fetch Dynamic HTML Elements from template </refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>void - <function>->getElements</function></funcdef> + <funcdef>void $flexy-> + <function>getElements</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml:1.5 peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml:1.6 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml:1.5 Sat Aug 2 08:02:08 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,15 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.outputobject"> <refnamediv> - <refname>->outputObject()</refname> + <refname>$flexy->outputObject()</refname> <refpurpose>Merges a controller object with the template and outputs the result</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>void - <function>->outputObject</function></funcdef> + <funcdef>void $flexy-> + <function>outputObject</function></funcdef> <paramdef>object <parameter>$controllerObject</parameter></paramdef> <paramdef>array <parameter><optional>$elements</optional></parameter></paramdef> </funcprototype> @@ -68,8 +68,8 @@ $elements['test']->setValue("hello input"); $output = new HTML_Template_Flexy(); -$output->compile("hello.html",$elements); -$output->outputObject($data); +$output->compile("hello.html"); +$output->outputObject($data,$elements); ]]> </programlisting>
Index: peardoc/en/package/html/html-template-flexy.xml diff -u peardoc/en/package/html/html-template-flexy.xml:1.10 peardoc/en/package/html/html-template-flexy.xml:1.11 --- peardoc/en/package/html/html-template-flexy.xml:1.10 Sat Aug 2 09:50:13 2003 +++ peardoc/en/package/html/html-template-flexy.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.10 $ --> +<!-- $Revision: 1.11 $ --> <sect1 id="package.html.html-template-flexy"> <title>HTML_Template_Flexy</title> @@ -17,12 +17,15 @@ <!-- element! --> &package.html.html-template-flexy.element.html-template-flexy-element; -&package.html.html-template-flexy.element.childrentohtml; + +&package.html.html-template-flexy.element.setvalue; +&package.html.html-template-flexy.element.setoptions; + &package.html.html-template-flexy.element.removeattributes; &package.html.html-template-flexy.element.setattributes; -&package.html.html-template-flexy.element.setoptions; -&package.html.html-template-flexy.element.setvalue; + &package.html.html-template-flexy.element.tohtml; +<!-- &package.html.html-template-flexy.element.childrentohtml; --> &package.html.html-template-flexy.element.tohtmlnoclose; Index: peardoc/en/package/html/html-template-flexy/configuration.xml diff -u peardoc/en/package/html/html-template-flexy/configuration.xml:1.5 peardoc/en/package/html/html-template-flexy/configuration.xml:1.6 --- peardoc/en/package/html/html-template-flexy/configuration.xml:1.5 Sat Aug 2 08:02:08 2003 +++ peardoc/en/package/html/html-template-flexy/configuration.xml Tue Aug 12 22:31:29 2003 @@ -38,6 +38,7 @@ forceCompile = 0 debug = 0 locale = en +compiler = Standard </programlisting> </example> @@ -65,11 +66,12 @@ <programlisting role="php"><![CDATA[ <?php $options = array( - 'templateDir' => '/home/me/Projects/myapplication/templates', - 'compileDir' => '/home/me/Projects/myapplication/compiled_templates', - 'forceCompile' => 0, - 'debug' => 0, - 'locale' = 'en' + 'templateDir' => '/home/me/Projects/myapplication/templates', + 'compileDir' => '/home/me/Projects/myapplication/compiled_templates', + 'forceCompile' => 0, + 'debug' => 0, + 'locale' => 'en', + 'compiler' => 'Standard', ); $template = new HTML_Template_Flexy($options); ?> @@ -158,6 +160,18 @@ <para> Default is 'en' - english. The language use for reading/writing templates. Currently it is only used in the compiled files filename = eg. originalname.html.en.php + </para> + + <para> + Flexy uses get_text() internally if it is installed, and will replace all strings in a HTML page + with the return value of get_text(). - This enables the creation of multilanguage sites with a little less pain. + + </para> + <para> + A file {templatename}.strings.serial is created for each file that is parsed, you can use this with PHP's + unserialize function to retrieve an array of all the strings in a file. (for translating), or just use + the tool xgettext. + </para> </listitem> </varlistentry> Index: peardoc/en/package/html/html-template-flexy/intro.xml diff -u peardoc/en/package/html/html-template-flexy/intro.xml:1.5 peardoc/en/package/html/html-template-flexy/intro.xml:1.6 --- peardoc/en/package/html/html-template-flexy/intro.xml:1.5 Mon Mar 10 17:27:43 2003 +++ peardoc/en/package/html/html-template-flexy/intro.xml Tue Aug 12 22:31:29 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.intro"> <refnamediv> <refname>Introduction</refname> @@ -74,7 +74,7 @@ <title>Typical usage example for <classname>HTML_Template_Flexy</classname></title> <programlisting role="php"> <![CDATA[ - <? +<?php /* configure the application - probably done elsewhere */ require_once 'HTML/Template/Flexy.php'; @@ -91,8 +91,9 @@ var $template = "home.html"; // name of template var $title; // this relates to {title}; var $numbers = array(); // this relates to {numbers} , used with foreach - var $form; // this relates to the form elements object + var $anObject; + var $element = array(); // this is where the elements are stored /* start section - deals with posts, get variables etc.*/ @@ -105,14 +106,21 @@ function start() { + // the title $this->title = "Hello World"; + // store an object. + $this->anObject = new StdClass; - // use a object for the form (or use a dataobject) - $this->form = new StdClass; + // assign a value to a member. + $this->anObject->member = 'Object Member'; + + // create an HTML Element for the form element. + $this->elements['input'] = new HTML_Template_Flexy_Element; + + // assign a value to it + $this->elements['input']->setValue('Hello'); - // assign the default value for the form element. - $this->form->input = "Hello"; for ($i = 1;$i< 5;$i++) { $this->numbers[$i] = "Number $i"; @@ -124,10 +132,16 @@ function output() { $output = new HTML_Template_Flexy(); $output->compile($this->template); - $output->outputObject($this); + $output->outputObject($this,$this->elements); } + function someMethod() { + echo "<B>Hello From A Method</B>"; + } + + + } /* the page controller instantaation - probably done with a factory method in your master page controller class */ @@ -153,26 +167,55 @@ </head> <body> <H1>{title}</H1> + + + <form name="form"> <table> <tr> <td> + <?php /* this will be merged with the date in the $element['input'] object*/ ?> + Input Box: <input name="input"> </td> </tr> - <!-- note here the use for foreach as an attribute value --> + <?php /* note here the use for flexy:foreach as an attribute value */ ?> - <tr foreach="numbers,number,string"> + <tr flexy:foreach="numbers,number,string"> <td> + + <?php /* note here the use for flexy:foreach as an attribute value */ ?> + <a href="mypage.html?id=%7Bnumber%7D">{string}</a> </td> </tr> </table> + + <?php /* there is some limited support for array access */ ?> + + this is number 2 : {numbers[2]} + + + <?php /* note that full stops seperate object and variables or methods */ ?> + + This is a {anObject.member} + + <?php /* you can call methods of the object */ ?> + + {someMethod()} + + <?php /* by default everything is htmlspecialchar escaped use the modifier :h to prevent this. */ ?> + + {someMethod():h} + </body> </html> + +<?php /* I've used php for comments here as HTML comments didnt work when generating the +manual .. - you dont have to use them - it has nothing to do with the template engine */ ?> ]]> </programlisting> @@ -182,9 +225,11 @@ </para> <example> <title>Output of example for <classname>HTML_Template_Flexy</classname></title> - <programlisting role="php"> + <programlisting role="html"> <![CDATA[ + + Hello World Input Box : [Hello ] @@ -193,7 +238,15 @@ Number 3 Number 4 - +this is number 2 : Number 2 + + +This is a member Variable + +<B>Hello From A Method</B> + +Hello From A Method + ]]> </programlisting> </example> Index: peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml diff -u peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml:1.4 peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml:1.5 --- peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml:1.4 Sat Aug 2 21:23:16 2003 +++ peardoc/en/package/html/html-template-flexy/element/html_template_flexy_element.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> @@ -23,8 +23,8 @@ <refsect1 id="package.html.html-template-flexy.element.html-template-flexy-element.desc"> &title.desc; <para> - Flexy uses a single lightweight classe to represent All HTML Tags, All the variables of the class are - public, and you are encouraged to use them. And the methods provide common + Flexy uses a single lightweight class to represent All HTML Tags, All the variables of the class are + public, and you are encouraged to use them. And the methods provide generic assignment and conversion abilities. </para> </refsect1> @@ -71,7 +71,7 @@ <term> <type>string</type> - <parameter>element->tag</parameter> + <parameter>$element->tag</parameter> </term> <listitem> <para> Index: peardoc/en/package/html/html-template-flexy/element/tohtml.xml diff -u peardoc/en/package/html/html-template-flexy/element/tohtml.xml:1.3 peardoc/en/package/html/html-template-flexy/element/tohtml.xml:1.4 --- peardoc/en/package/html/html-template-flexy/element/tohtml.xml:1.3 Sat Aug 2 10:05:49 2003 +++ peardoc/en/package/html/html-template-flexy/element/tohtml.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.html.html-template-flexy.element.tohtml"> <refnamediv> <refname>$element->toHtml</refname> @@ -6,11 +6,9 @@ </refnamediv> <refsynopsisdiv> <funcsynopsis> - <funcsynopsisinfo> - require_once 'Flexy/Element.php'; - </funcsynopsisinfo> + <funcprototype> - <funcdef>string <function>HTML_Template_Flexy_Element::toHtml</function></funcdef> + <funcdef>string $element-><function>toHtml</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> @@ -18,7 +16,11 @@ <refsect1 id="package.html.html-template-flexy.element.tohtml.desc"> &title.desc; - ¬documented; + <para> + returns the HTML to represent the object. If you wish to implement your own element, you only need + to implement this method, and assign it to the element array.. + + </para> </refsect1> <refsect1 id="package.html.html-template-flexy.element.tohtml.throws"> Index: peardoc/en/package/html/html-template-flexy/factory/fromarray.xml diff -u peardoc/en/package/html/html-template-flexy/factory/fromarray.xml:1.4 peardoc/en/package/html/html-template-flexy/factory/fromarray.xml:1.5 --- peardoc/en/package/html/html-template-flexy/factory/fromarray.xml:1.4 Thu Aug 7 11:21:09 2003 +++ peardoc/en/package/html/html-template-flexy/factory/fromarray.xml Tue Aug 12 22:31:29 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="package.html.html-template-flexy.factory.fromarray"> <refnamediv> <refname>$factory->fromArray()</refname> @@ -59,6 +59,7 @@ <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> + <refsect1 id="package.html.html-template-flexy.factory.fromarray.note"> &title.note; <para> Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml:1.5 peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml:1.6 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml:1.5 Sat Aug 2 08:02:08 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,14 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.bufferedoutputobject"> <refnamediv> - <refname>->bufferedOutputObject()</refname> + <refname>$flexy->bufferedOutputObject()</refname> <refpurpose>Merges a controller object with the template and returns the result</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> - + <funcprototype> - <funcdef>void - <function>->bufferedOutputObject</function></funcdef> + <funcdef>void $flexy-><function>bufferedOutputObject</function></funcdef> <paramdef>object <parameter>$controllerObject</parameter></paramdef> <paramdef>array <parameter><optional>$elements</optional></parameter></paramdef> </funcprototype> Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml:1.5 peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml:1.6 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml:1.5 Mon May 12 16:15:50 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/compile.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,15 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.compile"> <refnamediv> - <refname>->compile()</refname> + <refname>$flexy->compile()</refname> <refpurpose>Converts a template from markup to PHP if required</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>void - <function>->compile</function></funcdef> + <funcdef>void $flexy-> + <function>compile</function></funcdef> <paramdef>string <parameter>$template</parameter></paramdef> </funcprototype> 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.1 peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.2 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml:1.1 Sat Aug 2 08:02:54 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/getelements.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,15 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.getelements"> <refnamediv> - <refname>->getElements()</refname> + <refname>$flexy->getElements()</refname> <refpurpose>Fetch Dynamic HTML Elements from template </refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>void - <function>->getElements</function></funcdef> + <funcdef>void $flexy-> + <function>getElements</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> Index: peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml diff -u peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml:1.5 peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml:1.6 --- peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml:1.5 Sat Aug 2 08:02:08 2003 +++ peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml Tue Aug 12 22:31:29 2003 @@ -1,15 +1,15 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry id="package.html.html-template-flexy.html-template-flexy.outputobject"> <refnamediv> - <refname>->outputObject()</refname> + <refname>$flexy->outputObject()</refname> <refpurpose>Merges a controller object with the template and outputs the result</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> - <funcdef>void - <function>->outputObject</function></funcdef> + <funcdef>void $flexy-> + <function>outputObject</function></funcdef> <paramdef>object <parameter>$controllerObject</parameter></paramdef> <paramdef>array <parameter><optional>$elements</optional></parameter></paramdef> </funcprototype> @@ -68,8 +68,8 @@ $elements['test']->setValue("hello input"); $output = new HTML_Template_Flexy(); -$output->compile("hello.html",$elements); -$output->outputObject($data); +$output->compile("hello.html"); +$output->outputObject($data,$elements); ]]> </programlisting>