cvs: peardoc /en/package/html html-template-flexy.xml /en/package/html/html-template-flexy configuration.xml
/en/package/html/html-template-flexy/html-template-flexy bufferedoutputobject.xml outputobject.xml
| From: | Alan Knowles | Date: | Sat, 02 Aug 2003 12:02:08 +0000 |
| Subject: | cvs: peardoc /en/package/html html-template-flexy.xml /en/package/html/html-template-flexy configuration.xml /en/package/html/html-template-flexy/html-template-flexy bufferedoutputobject.xml outputobject.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-1169@lists.php.net to get a copy of this message | ||
alan_k Sat Aug 2 08:02:08 2003 EDT
Modified files:
/peardoc/en/package/html html-template-flexy.xml
/peardoc/en/package/html/html-template-flexy configuration.xml
/peardoc/en/package/html/html-template-flexy/html-template-flexy
bufferedoutputobject.xml
outputobject.xml
Log:
adding getelement docs - finally getting back into sync with reality..
Index: peardoc/en/package/html/html-template-flexy.xml
diff -u peardoc/en/package/html/html-template-flexy.xml:1.8
peardoc/en/package/html/html-template-flexy.xml:1.9
--- peardoc/en/package/html/html-template-flexy.xml:1.8 Mon Apr 7 11:50:12 2003
+++ peardoc/en/package/html/html-template-flexy.xml Sat Aug 2 08:02:08 2003
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<sect1 id="package.html.html-template-flexy">
<title>HTML_Template_Flexy</title>
@@ -12,6 +12,7 @@
&package.html.html-template-flexy.html-template-flexy.compile;
&package.html.html-template-flexy.html-template-flexy.outputobject;
&package.html.html-template-flexy.html-template-flexy.bufferedoutputobject;
+ &package.html.html-template-flexy.html-template-flexy.getelements;
<!-- &package.html.html-template-flexy.html-template-flexy.staticQuickTemplate; -->
Index: peardoc/en/package/html/html-template-flexy/configuration.xml
diff -u peardoc/en/package/html/html-template-flexy/configuration.xml:1.4
peardoc/en/package/html/html-template-flexy/configuration.xml:1.5
--- peardoc/en/package/html/html-template-flexy/configuration.xml:1.4 Mon Mar 10 17:27:43 2003
+++ peardoc/en/package/html/html-template-flexy/configuration.xml Sat Aug 2 08:02:08 2003
@@ -161,7 +161,22 @@
</para>
</listitem>
</varlistentry>
-
+
+
+ <varlistentry>
+ <term>
+ <parameter>compiler</parameter>
+ <type>string</type>
+ </term>
+ <listitem>
+ <para>
+ Default is 'Standard' - The standard Tokenizer Driver engine. Other engines
available are
+ regex (similar to Xipe's engine). You can use this field to write your own
engines, either based
+ Off the core code, or totally seperate..
+
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
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.4
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.4 Mon
Mar 10 17:27:44 2003
+++ peardoc/en/package/html/html-template-flexy/html-template-flexy/bufferedoutputobject.xml Sat Aug
2 08:02:08 2003
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry
id="package.html.html-template-flexy.html-template-flexy.bufferedoutputobject">
<refnamediv>
<refname>->bufferedOutputObject()</refname>
@@ -9,9 +9,9 @@
<funcprototype>
<funcdef>void
- <function>->bufferedOutputObject()</function></funcdef>
- <paramdef>object
- <parameter>$controllerObject</parameter></paramdef>
+ <function>->bufferedOutputObject</function></funcdef>
+ <paramdef>object <parameter>$controllerObject</parameter></paramdef>
+ <paramdef>array
<parameter><optional>$elements</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -32,7 +32,8 @@
<refsect1
id="package.html.html-template-flexy.html-template-flexy.bufferedoutputobject.parameter">
&title.param;
<para>
- <itemizedlist>
+ <itemizedlist>
+
<listitem>
<para>
<parameter>object $controllerObject</parameter> -
@@ -40,6 +41,15 @@
relate to the $controllerObject->tag will map to {tag} on the template
</para>
</listitem>
+
+ <listitem>
+ <para>
+ <parameter>array $elements</parameter> -
+ This is an associative array of form, or dynamic elements names (or id's) which will be
merged with
+ the one defined in the template.
+ </para>
+ </listitem>
+
</itemizedlist>
</para>
@@ -77,9 +87,17 @@
function send_password() {
$this->generatePassword();
- $template = new HTML_Template_Flexy();
+ /* use the regex compiler, as it doesnt parse <tags */
+ $template = new HTML_Template_Flexy(array('compiler'=>'Regex');
+
+ /* compile a text file (email template) */
$template->compile("Emails/Send_Password.txt");
+
+ /* use variables from this object to ouput data. */
$mailtext = $template->bufferedOutputObject($this);
+
+
+ /* With the output try and send an email, using a few tricks in Mail_MimeDecode. */
$decoder = new Mail_mimeDecode($mailtext);
$parts = $decoder->getSendArray();
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.4
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.4 Mon Mar 10
17:27:44 2003
+++ peardoc/en/package/html/html-template-flexy/html-template-flexy/outputobject.xml Sat Aug 2
08:02:08 2003
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="package.html.html-template-flexy.html-template-flexy.outputobject">
<refnamediv>
<refname>->outputObject()</refname>
@@ -9,23 +9,24 @@
<funcprototype>
<funcdef>void
- <function>->outputObject()</function></funcdef>
- <paramdef>object
- <parameter>$controllerObject</parameter></paramdef>
+ <function>->outputObject</function></funcdef>
+ <paramdef>object <parameter>$controllerObject</parameter></paramdef>
+ <paramdef>array
<parameter><optional>$elements</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1
id="package.html.html-template-flexy.html-template-flexy.outputobject.desc">
&title.desc;
<para>
- This maps the values of the supplied object and runs the compiled template,
- and outputs the result.
+ This makes the values of the supplied object (and optionally loads the
HTML_Template_Flexy_Elements)
+ available to the template when it is run.
</para>
</refsect1>
<refsect1
id="package.html.html-template-flexy.html-template-flexy.outputobject.parameter">
&title.param;
<para>
<itemizedlist>
+
<listitem>
<para>
<parameter>object $controllerObject</parameter> -
@@ -33,6 +34,15 @@
relate to the $controllerObject->tag will map to {tag} on the template
</para>
</listitem>
+
+ <listitem>
+ <para>
+ <parameter>array $elements</parameter> -
+ This is an associative array of form, or dynamic elements names (or id's) which will be
merged with
+ the one defined in the template.
+ </para>
+ </listitem>
+
</itemizedlist>
</para>
</refsect1>
@@ -54,8 +64,11 @@
$data = new example;
+$elements['test'] = new HTML_Template_Flexy_Element;
+$elements['test']->setValue("hello input");
+
$output = new HTML_Template_Flexy();
-$output->compile("hello.html");
+$output->compile("hello.html",$elements);
$output->outputObject($data);
]]>
@@ -68,6 +81,7 @@
<![CDATA[
<B>{tag}</B>
<B>{tag:h}</B>
+<INPUT name="test">
]]>
</programlisting>
@@ -78,6 +92,7 @@
<![CDATA[
<B>>> hello world</B>
<B>>> hello world</B>
+<INPUT name="test" value="hello input">
]]>
</programlisting>
</example>