/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/tutorials/phpHtmlLib/Container.cls
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/tutorials/phpHtmlLib/Container.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu May 6 16:41:47 2004 UTC (20 years, 3 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
 updated all to v2.4.1 - Apr 01, 2004

1 jonen 1.1 <refentry id="{@id}">
2     <refnamediv>
3     <refname>Container</refname>
4     <refpurpose>This is the base class for all of phpHtmlLib</refpurpose>
5     </refnamediv>
6     <refsynopsisdiv>
7     <refsynopsisdivinfo>
8     <author>
9     by Walter A. Boring IV
10     <authorblurb>{@link mailto:waboring@3gstech.com}</authorblurb>
11     </author>
12     <copyright>March 2004, Walter A. Boring IV</copyright>
13     <releaseinfo>phpHtmlLib 2.4.x</releaseinfo>
14     </refsynopsisdivinfo>
15     </refsynopsisdiv>
16     <refsect1 id="{@id description}">
17     <title>Description</title>
18     <para>This class is nothing more then a container widget. It lets you
19     push data into it, and it will render each item indented properly so it works with the rest of the libs.</para>
20     <para>This is helpfull when you have a function that wants to return multiple Tag Objects
21     or widgets. Just wrap them in this container
22     and they will all get rendered with the current indentation level.</para>
23     </refsect1>
24     <refsect1 id="{@id example}">
25     <title>Example</title>
26     <para>
27     <example>
28     <![CDATA[
29     $c = container('this is a', html_b('test') );
30     $c->add( html_br() );
31     print $c->render();]]>
32     </example>
33     </para>
34     </refsect1>
35    
36     <refsect1 id="{@id constructor}">
37     <title>Constructor call</title>
38     <para>
39     <para>This lets you pass in data that you want automatically
40     added to the container. You can add as man items in the
41     call the constructor. Then you can use the add() method
42     to add more items later.</para>
43     <example>
44     <![CDATA[$c = container('this is a', html_b('test'));]]>
45     </example>
46     </para>
47     </refsect1>
48     <refsect1 id="{@id add}">
49     <title>add Method</title>
50     <para>
51     <para>This lets you add new data to the container. You can pass in
52     strings, integers and other Container child objects that implement the
53     render() method.</para>
54     <example>
55     <![CDATA[$c = container();
56     $c->add('testing', 1, 2, 3);]]>
57     </example>
58     <para>The output:
59     <example><![CDATA[testing
60     1
61     2
62     3]]>
63     </example>
64     </para>
65     </para>
66     </refsect1>
67    
68     <refsect1 id="{@id collapse}">
69     <title>Collapse</title>
70     <para>
71     <para>This method is used to force the output to exist on 1 line, instead
72     of a newline for every element added. </para>
73     <example>
74     <![CDATA[$c = container();
75     $c->set_collapse();
76     $c->add('testing', 1, 2, 3);]]>
77     </example>
78     <para>The output:
79     <example><![CDATA[testing123]]></example>
80     </para>
81     </para>
82     </refsect1>
83     </refentry>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed