cvs: peardoc /en/package/html/html-table faq.xml intro.xml
| From: | Mark Wiesemann | Date: | Mon, 07 May 2007 21:31:57 +0000 |
| Subject: | cvs: peardoc /en/package/html/html-table faq.xml intro.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9709@lists.php.net to get a copy of this message | ||
wiesemann Mon May 7 21:31:57 2007 UTC
Modified files:
/peardoc/en/package/html/html-table faq.xml intro.xml
Log:
- Bug #10964: missing documentation on how attributes can be set
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-table/faq.xml?r1=1.4&r2=1.5&diff_format=u
Index: peardoc/en/package/html/html-table/faq.xml
diff -u peardoc/en/package/html/html-table/faq.xml:1.4
peardoc/en/package/html/html-table/faq.xml:1.5
--- peardoc/en/package/html/html-table/faq.xml:1.4 Sun Apr 29 19:30:40 2007
+++ peardoc/en/package/html/html-table/faq.xml Mon May 7 21:31:57 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="package.html.html-table.faq">
<refnamediv>
<refname>FAQ</refname>
@@ -53,6 +53,29 @@
</programlisting>
</answer>
</qandaentry>
+ <qandaentry>
+ <question>
+ <para>
+ How can I set attributes for the <literal>table</literal> tag?
+ </para>
+ </question>
+ <answer>
+ <para>
+ Besides the possibility to pass attributes to the <link
+ linkend="package.html.html-table.html-table.html-table">HTML_Table
+ constructor</link>, there are several more methods that can be used.
+ </para>
+ <para>
+ HTML_Table extends <ulink
+ url="http://pear.php.net/package/HTML_Common">HTML_Common</ulink>
which
+ offers methods like <function>setAttributes</function> or
+ <function>updateAttributes</function>. A complete list of methods
+ provided by HTML_Common can be found in its <ulink
+ url="http://pear.php.net/package/HTML_Common/docs/latest/apidoc/HTML_Common/HTML_Common.html">API
+ documentation</ulink>.
+ </para>
+ </answer>
+ </qandaentry>
</qandaset>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-table/intro.xml?r1=1.8&r2=1.9&diff_format=u
Index: peardoc/en/package/html/html-table/intro.xml
diff -u peardoc/en/package/html/html-table/intro.xml:1.8
peardoc/en/package/html/html-table/intro.xml:1.9
--- peardoc/en/package/html/html-table/intro.xml:1.8 Sun Apr 29 19:30:40 2007
+++ peardoc/en/package/html/html-table/intro.xml Mon May 7 21:31:57 2007
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='ISO-8859-1' ?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="package.html.html-table.intro">
<refnamediv>
<refname>Introduction</refname>
@@ -83,12 +83,25 @@
<![CDATA[
require_once 'HTML/Table.php';
-$tableAttrs = array('width' => '600');
-$table = new HTML_Table($tableAttrs);
+$attrs = array('width' => '600');
+$table = new HTML_Table($attrs);
$table->setAutoGrow(true);
$table->setAutoFill('n/a');
]]>
</programlisting>
+ Setting table attributes is also possible by using the
+ <function>setAttributes</function> method. Therefore, the example from
+ above can also be written as:
+ <programlisting role="php">
+<![CDATA[
+require_once 'HTML/Table.php';
+
+$attrs = array('width' => '600');
+$table = new HTML_Table();
+$table->setAttributes($attrs);
+// [...]
+]]>
+ </programlisting>
</para>
</refsect2>
<refsect2 id="package.html.html-table.intro.create.adddata">