| 1 |
<?xml version="1.0" encoding="iso-8859-1"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
<head> |
| 5 |
<!-- template designed by Marco Von Ballmoos --> |
| 6 |
<title>Container</title> |
| 7 |
<link rel="stylesheet" href="../media/stylesheet.css" /> |
| 8 |
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="page-body"> |
| 12 |
|
| 13 |
<table class="tutorial-nav-box"> |
| 14 |
<tr> |
| 15 |
<td style="width: 30%"> |
| 16 |
<span class="nav-button-disabled">Previous</span> |
| 17 |
</td> |
| 18 |
<td style="text-align: center"> |
| 19 |
</td> |
| 20 |
<td style="text-align: right; width: 30%"> |
| 21 |
<a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html" class="nav-button">Next</a> |
| 22 |
</td> |
| 23 |
</tr> |
| 24 |
<tr> |
| 25 |
<td style="width: 30%"> |
| 26 |
</td> |
| 27 |
<td style="text-align: center"> |
| 28 |
</td> |
| 29 |
<td style="text-align: right; width: 30%"> |
| 30 |
<span class="detail">XMLTagClass</span> |
| 31 |
</td> |
| 32 |
</tr> |
| 33 |
</table> |
| 34 |
|
| 35 |
<div><a name=""></a><div class="ref-title-box"><h1 class="ref-title">Container</h1> |
| 36 |
<h2 class="ref-purpose">This is the base class for all of phpHtmlLib</h2></div> |
| 37 |
<div class="ref-synopsis"><span class="author">by Walter A. Boring IV |
| 38 |
<div class="author-blurb"><a href="mailto:waboring@3gstech.com">mailto:waboring@3gstech.com</a></div></span> |
| 39 |
<div class="notes">March 2004, Walter A. Boring IV</div> |
| 40 |
<div class="release-info">(phpHtmlLib 2.4.x)</div></div> |
| 41 |
<span><a name="description"></a><h2 class="title">Description</h2><p>This class is nothing more then a container widget. It lets you |
| 42 |
push data into it, and it will render each item indented properly so it works with the rest of the libs.</p> |
| 43 |
<p>This is helpfull when you have a function that wants to return multiple Tag Objects |
| 44 |
or widgets. Just wrap them in this container |
| 45 |
and they will all get rendered with the current indentation level.</p></span> |
| 46 |
<span><a name="example"></a><h2 class="title">Example</h2><p><pre class="example"><pre> |
| 47 |
$c = container('this is a', html_b('test') ); |
| 48 |
$c->add( html_br() ); |
| 49 |
print $c->render();</pre></pre></p></span> |
| 50 |
|
| 51 |
<span><a name="constructor"></a><h2 class="title">Constructor call</h2><p><p>This lets you pass in data that you want automatically |
| 52 |
added to the container. You can add as man items in the |
| 53 |
call the constructor. Then you can use the add() method |
| 54 |
to add more items later.</p> |
| 55 |
<pre class="example"><pre>$c = container('this is a', html_b('test'));</pre></pre></p></span> |
| 56 |
<span><a name="add"></a><h2 class="title">add Method</h2><p><p>This lets you add new data to the container. You can pass in |
| 57 |
strings, integers and other Container child objects that implement the |
| 58 |
render() method.</p> |
| 59 |
<pre class="example"><pre>$c = container(); |
| 60 |
$c->add('testing', 1, 2, 3);</pre></pre> |
| 61 |
<p>The output: |
| 62 |
<pre class="example"><pre>testing |
| 63 |
1 |
| 64 |
2 |
| 65 |
3</pre></pre></p></p></span> |
| 66 |
|
| 67 |
<span><a name="collapse"></a><h2 class="title">Collapse</h2><p><p>This method is used to force the output to exist on 1 line, instead |
| 68 |
of a newline for every element added.</p> |
| 69 |
<pre class="example"><pre>$c = container(); |
| 70 |
$c->set_collapse(); |
| 71 |
$c->add('testing', 1, 2, 3);</pre></pre> |
| 72 |
<p>The output: |
| 73 |
<pre class="example"><pre>testing123</pre></pre></p></p></span></div> |
| 74 |
|
| 75 |
<table class="tutorial-nav-box"> |
| 76 |
<tr> |
| 77 |
<td style="width: 30%"> |
| 78 |
<span class="nav-button-disabled">Previous</span> |
| 79 |
</td> |
| 80 |
<td style="text-align: center"> |
| 81 |
</td> |
| 82 |
<td style="text-align: right; width: 30%"> |
| 83 |
<a href="../phpHtmlLib/tutorial_XMLTagClass.cls.html" class="nav-button">Next</a> |
| 84 |
</td> |
| 85 |
</tr> |
| 86 |
<tr> |
| 87 |
<td style="width: 30%"> |
| 88 |
</td> |
| 89 |
<td style="text-align: center"> |
| 90 |
</td> |
| 91 |
<td style="text-align: right; width: 30%"> |
| 92 |
<span class="detail">XMLTagClass</span> |
| 93 |
</td> |
| 94 |
</tr> |
| 95 |
</table> |
| 96 |
|
| 97 |
<p class="notes" id="credit"> |
| 98 |
Documentation generated on Thu, 1 Apr 2004 09:37:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC2</a> |
| 99 |
</p> |
| 100 |
</div></body> |
| 101 |
</html> |