cvs: peardoc / global.ent /en/package html.xml /en/package/html html-page2.xml /en/package/html/html-page2 body.xml creating.xml headers.xml
output.xml
| From: | Christian Weiske | Date: | Tue, 14 Nov 2006 10:49:23 +0000 |
| Subject: | cvs: peardoc / global.ent /en/package html.xml /en/package/html html-page2.xml /en/package/html/html-page2 body.xml creating.xml headers.xml output.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-8797@lists.php.net to get a copy of this message | ||
cweiske Tue Nov 14 10:49:23 2006 UTC
Added files:
/peardoc/en/package/html html-page2.xml
/peardoc/en/package/html/html-page2 body.xml creating.xml
headers.xml output.xml
Modified files:
/peardoc global.ent
/peardoc/en/package html.xml
Log:
Documentation for HTML_Page2
http://cvs.php.net/viewvc.cgi/peardoc/global.ent?r1=1.66&r2=1.67&diff_format=u Index: peardoc/global.ent diff -u peardoc/global.ent:1.66 peardoc/global.ent:1.67 --- peardoc/global.ent:1.66 Sun Nov 12 17:42:31 2006 +++ peardoc/global.ent Tue Nov 14 10:49:23 2006 @@ -1,6 +1,6 @@ <!-- -*- SGML -*- - $Id: global.ent,v 1.66 2006/11/12 17:42:31 wiesemann Exp $ + $Id: global.ent,v 1.67 2006/11/14 10:49:23 cweiske Exp $ Contains global "macros" for all the XML documents. @@ -218,3 +218,5 @@ <!ENTITY url.liveuser.gvngroup.be.intro "http://www.gvngroup.be/doc/LiveUser/index.php"> <!ENTITY url.liveuser.gvngroup.be.admin.intro "http://www.gvngroup.be/doc/LiveUser_Admin/index.php"> +<!-- For links to the API documentation generated by phpdocumentor --> +<!ENTITY phpdocbase.html-page2 "http://pear.php.net/package/HTML_Page2/docs/latest/HTML_Page2/HTML_Page2.html#method"> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html.xml?r1=1.22&r2=1.23&diff_format=u Index: peardoc/en/package/html.xml diff -u peardoc/en/package/html.xml:1.22 peardoc/en/package/html.xml:1.23 --- peardoc/en/package/html.xml:1.22 Wed Nov 1 15:21:47 2006 +++ peardoc/en/package/html.xml Tue Nov 14 10:49:23 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.22 $ --> +<!-- $Revision: 1.23 $ --> <chapter id="package.html"> <title>HTML</title> @@ -12,6 +12,7 @@ &package.html.html-crypt; &package.html.html-form; &package.html.html-menu; + &package.html.html-page2; &package.html.html-quickform; &package.html.html-quickform-controller; &package.html.html-quickform-renderer-tableless; http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2.xml +++ peardoc/en/package/html/html-page2.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="package.html.html-page2"> <title>HTML_Page2</title> <para> API to create HTML Pages </para> <!-- - Creating - Doctype - Headers - Stylesheets: Inline and reference - Meta tags - Body: Content elements - Output: print, get as string --> &package.html.html-page2.creating; &package.html.html-page2.headers; &package.html.html-page2.body; &package.html.html-page2.output; </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/body.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/body.xml +++ peardoc/en/package/html/html-page2/body.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.body"> <refnamediv> <refname>Body</refname> <refpurpose>Adding content</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.body.description"> <title>Description</title> <para> After creating the page and setting headers, you want to add actual content to the page. The method in charge is <ulink url="&phpdocbase.html-page2;addBodyContent"><function>addBodyContent</function></ulink>. </para> <para> By default, if content already exists, the new content is appended. If you wish to overwrite whatever is in the body, use <ulink url="&phpdocbase.html-page2;setBody"><function>setBody</function></ulink>; <ulink url="&phpdocbase.html-page2;unsetBody"><function>unsetBody</function></ulink> completely empties the body without inserting new content. You can also use <ulink url="&phpdocbase.html-page2;prependBodyContent"><function>prependBodyContent</function></ulink> to prepend content to whatever is currently in the array of body elements. </para> <para> The following constants are defined to be passed as the flag attribute: <literal>HTML_PAGE2_APPEND</literal>, <literal>HTML_PAGE2_PREPEND</literal> and <literal>HTML_PAGE2_REPLACE</literal>. Their usage should be quite clear from their names. </para> <programlisting role="php"><![CDATA[ <?php $page->addBodyContent('<h1>Hello!</h1>'); $page->addBodyContent('<p>This is a paragraph.</p>'); ?> ]]></programlisting> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/creating.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/creating.xml +++ peardoc/en/package/html/html-page2/creating.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.creating"> <refnamediv> <refname>Creation</refname> <refpurpose>Making a new page</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.creating.description"> <title>Description</title> <para> A HTML page is created by instantiating a new <classname>HTML_Page2</classname> object. While you may pass an array of attributes to the constructor, it isn't required since the default settings are fairly intuitive. </para> <itemizedlist> <title>Default page settings</title> <listitem> <para> Unix line endings (\n) </para> </listitem> <listitem> <para> <literal>UTF-8</literal> charset </para> </listitem> <listitem> <para> <literal>text/html</literal> MIME type </para> </listitem> <listitem> <para> <literal>XHTML 1.0 Transitional</literal> doctype </para> </listitem> <listitem> <para> English language </para> </listitem> </itemizedlist> <para> If you don't like these settings, you can either pass an array of settings to the <ulink url="&phpdocbase.html-page2;HTML_Page2">constructor</ulink> or use setter methods such as <ulink url="&phpdocbase.html-page2;setDoctype"><function>setDoctype</function></ulink>, <ulink url="&phpdocbase.html-page2;setMimeEncoding"><function>setMimeEncoding</function></ulink> or <ulink url="&phpdocbase.html-page2;setCharset"><function>setCharset</function></ulink> . </para> <example> <title>Creating a HTML page</title> <programlisting role="php"><![CDATA[ <?php require_once 'HTML/Page2.php'; $page = new HTML_Page2(); $page->setTitle('My first HTML page'); $page->addBodyContent('<h1>Hello!</h1>'); $page->display(); ?> ]]></programlisting> </example> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/headers.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/headers.xml +++ peardoc/en/package/html/html-page2/headers.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.headers"> <refnamediv> <refname>Headers</refname> <refpurpose>Setting title and other meta data</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.headers.description"> <title>Setting headers</title> <para> The method you surely will use is <ulink url="&phpdocbase.html-page2;setTitle"><function>setTitle</function></ulink> that sets the title of the page; the one that your browser displays in its title/window bar. </para> <programlisting role="php"><![CDATA[ <?php $page->setTitle('My first HTML page'); ?> ]]></programlisting> <para> Meta tags can be set with <ulink url="&phpdocbase.html-page2;setMetaData"><function>setMetaData</function></ulink> which takes two parameters, the tag name and the content. </para> <programlisting role="php"><![CDATA[ <?php $page->setMetaData('author', 'Christian Weiske'); ?> ]]></programlisting> <para> A link to a bookmark icon (favicon) can be set using <ulink url="&phpdocbase.html-page2;addFavicon"><function>addFavicon</function></ulink> . </para> <para> Links to related pages (previous, next, home etc.) are added with <ulink url="&phpdocbase.html-page2;addHeadLink"><function>addHeadLink</function></ulink> - the first parameter determines the URL, the second the relation. </para> <programlisting role="php"><![CDATA[ <?php $page->addHeadLink('home.htm', 'Start'); ?> ]]></programlisting> </refsect1> <refsect1 id="package.html.html-page2.headers.css"> <title>Adding CSS - Cascading stylesheets</title> <para> A HTML page may contain two types of stylesheets: Inline css and a link to external <filename>.css</filename> file. </para> <para> Inline CSS declarations are made with <ulink url="&phpdocbase.html-page2;addStyleDeclaration"><function>addStyleDeclaration</function></ulink> </para> <programlisting role="php"><![CDATA[ $page->addStyleDeclaration(' div.block { border: 1px solid #000; } '); ]]></programlisting> <para> Links to external CSS files are created by using <ulink url="&phpdocbase.html-page2;addStyleSheet"><function>addStyleSheet</function></ulink>. The optional third parameter determines which media type the stylesheet shall be used for. </para> <programlisting role="php"><![CDATA[ <?php $page->addStyleSheet('css/dark.css'); $page->addStyleSheet('css/print.css', 'text/css', 'print'); ?> ]]></programlisting> </refsect1> <refsect1 id="package.html.html-page2.headers.scripts"> <title>Adding scripts</title> <para> You may want to add some javascript code to your page; either inline or link to an external <filename>.js</filename> file. </para> <para> Inline code blocks are added with <ulink url="&phpdocbase.html-page2;addScriptDeclaration"><function>addScriptDeclaration</function></ulink> . The optional second parameter defaults to <literal>text/javascript</literal> but can be changed as needed. </para> <programlisting role="php"><![CDATA[ <?php $page->addScriptDeclaration(' function javaScriptTest() { alert("Test"); } '); ?> ]]></programlisting> <para> Links to external script files are created by using <ulink url="&phpdocbase.html-page2;addScript"><function>addScript</function></ulink>. </para> <programlisting role="php"><![CDATA[ <?php $page->addScript('js/functions.js'); ?> ]]></programlisting> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/output.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/output.xml +++ peardoc/en/package/html/html-page2/output.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.output"> <refnamediv> <refname>Output</refname> <refpurpose>Finishing the page</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.output.description"> <title>Description</title> <para> After adding all the headers and content to the page, you want to get the page to the user. <ulink url="&phpdocbase.html-page2;display"><function>display</function></ulink> directly echoes the page to the browser. </para> <para> If you want to do something with the result page before pushing it to the browser, use <ulink url="&phpdocbase.html-page2;toHtml"><function>toHtml</function></ulink> . It returns the page as string that can be modified further. </para> <programlisting role="php"><![CDATA[ <?php //push it to the browser $page->display(); //or put it into a variable $html = $page->toHtml(); ?> ]]></programlisting> </refsect1> </refentry>
http://cvs.php.net/viewvc.cgi/peardoc/global.ent?r1=1.66&r2=1.67&diff_format=u Index: peardoc/global.ent diff -u peardoc/global.ent:1.66 peardoc/global.ent:1.67 --- peardoc/global.ent:1.66 Sun Nov 12 17:42:31 2006 +++ peardoc/global.ent Tue Nov 14 10:49:23 2006 @@ -1,6 +1,6 @@ <!-- -*- SGML -*- - $Id: global.ent,v 1.66 2006/11/12 17:42:31 wiesemann Exp $ + $Id: global.ent,v 1.67 2006/11/14 10:49:23 cweiske Exp $ Contains global "macros" for all the XML documents. @@ -218,3 +218,5 @@ <!ENTITY url.liveuser.gvngroup.be.intro "http://www.gvngroup.be/doc/LiveUser/index.php"> <!ENTITY url.liveuser.gvngroup.be.admin.intro "http://www.gvngroup.be/doc/LiveUser_Admin/index.php"> +<!-- For links to the API documentation generated by phpdocumentor --> +<!ENTITY phpdocbase.html-page2 "http://pear.php.net/package/HTML_Page2/docs/latest/HTML_Page2/HTML_Page2.html#method"> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html.xml?r1=1.22&r2=1.23&diff_format=u Index: peardoc/en/package/html.xml diff -u peardoc/en/package/html.xml:1.22 peardoc/en/package/html.xml:1.23 --- peardoc/en/package/html.xml:1.22 Wed Nov 1 15:21:47 2006 +++ peardoc/en/package/html.xml Tue Nov 14 10:49:23 2006 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.22 $ --> +<!-- $Revision: 1.23 $ --> <chapter id="package.html"> <title>HTML</title> @@ -12,6 +12,7 @@ &package.html.html-crypt; &package.html.html-form; &package.html.html-menu; + &package.html.html-page2; &package.html.html-quickform; &package.html.html-quickform-controller; &package.html.html-quickform-renderer-tableless; http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2.xml +++ peardoc/en/package/html/html-page2.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <sect1 id="package.html.html-page2"> <title>HTML_Page2</title> <para> API to create HTML Pages </para> <!-- - Creating - Doctype - Headers - Stylesheets: Inline and reference - Meta tags - Body: Content elements - Output: print, get as string --> &package.html.html-page2.creating; &package.html.html-page2.headers; &package.html.html-page2.body; &package.html.html-page2.output; </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/body.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/body.xml +++ peardoc/en/package/html/html-page2/body.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.body"> <refnamediv> <refname>Body</refname> <refpurpose>Adding content</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.body.description"> <title>Description</title> <para> After creating the page and setting headers, you want to add actual content to the page. The method in charge is <ulink url="&phpdocbase.html-page2;addBodyContent"><function>addBodyContent</function></ulink>. </para> <para> By default, if content already exists, the new content is appended. If you wish to overwrite whatever is in the body, use <ulink url="&phpdocbase.html-page2;setBody"><function>setBody</function></ulink>; <ulink url="&phpdocbase.html-page2;unsetBody"><function>unsetBody</function></ulink> completely empties the body without inserting new content. You can also use <ulink url="&phpdocbase.html-page2;prependBodyContent"><function>prependBodyContent</function></ulink> to prepend content to whatever is currently in the array of body elements. </para> <para> The following constants are defined to be passed as the flag attribute: <literal>HTML_PAGE2_APPEND</literal>, <literal>HTML_PAGE2_PREPEND</literal> and <literal>HTML_PAGE2_REPLACE</literal>. Their usage should be quite clear from their names. </para> <programlisting role="php"><![CDATA[ <?php $page->addBodyContent('<h1>Hello!</h1>'); $page->addBodyContent('<p>This is a paragraph.</p>'); ?> ]]></programlisting> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/creating.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/creating.xml +++ peardoc/en/package/html/html-page2/creating.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.creating"> <refnamediv> <refname>Creation</refname> <refpurpose>Making a new page</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.creating.description"> <title>Description</title> <para> A HTML page is created by instantiating a new <classname>HTML_Page2</classname> object. While you may pass an array of attributes to the constructor, it isn't required since the default settings are fairly intuitive. </para> <itemizedlist> <title>Default page settings</title> <listitem> <para> Unix line endings (\n) </para> </listitem> <listitem> <para> <literal>UTF-8</literal> charset </para> </listitem> <listitem> <para> <literal>text/html</literal> MIME type </para> </listitem> <listitem> <para> <literal>XHTML 1.0 Transitional</literal> doctype </para> </listitem> <listitem> <para> English language </para> </listitem> </itemizedlist> <para> If you don't like these settings, you can either pass an array of settings to the <ulink url="&phpdocbase.html-page2;HTML_Page2">constructor</ulink> or use setter methods such as <ulink url="&phpdocbase.html-page2;setDoctype"><function>setDoctype</function></ulink>, <ulink url="&phpdocbase.html-page2;setMimeEncoding"><function>setMimeEncoding</function></ulink> or <ulink url="&phpdocbase.html-page2;setCharset"><function>setCharset</function></ulink> . </para> <example> <title>Creating a HTML page</title> <programlisting role="php"><![CDATA[ <?php require_once 'HTML/Page2.php'; $page = new HTML_Page2(); $page->setTitle('My first HTML page'); $page->addBodyContent('<h1>Hello!</h1>'); $page->display(); ?> ]]></programlisting> </example> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/headers.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/headers.xml +++ peardoc/en/package/html/html-page2/headers.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.headers"> <refnamediv> <refname>Headers</refname> <refpurpose>Setting title and other meta data</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.headers.description"> <title>Setting headers</title> <para> The method you surely will use is <ulink url="&phpdocbase.html-page2;setTitle"><function>setTitle</function></ulink> that sets the title of the page; the one that your browser displays in its title/window bar. </para> <programlisting role="php"><![CDATA[ <?php $page->setTitle('My first HTML page'); ?> ]]></programlisting> <para> Meta tags can be set with <ulink url="&phpdocbase.html-page2;setMetaData"><function>setMetaData</function></ulink> which takes two parameters, the tag name and the content. </para> <programlisting role="php"><![CDATA[ <?php $page->setMetaData('author', 'Christian Weiske'); ?> ]]></programlisting> <para> A link to a bookmark icon (favicon) can be set using <ulink url="&phpdocbase.html-page2;addFavicon"><function>addFavicon</function></ulink> . </para> <para> Links to related pages (previous, next, home etc.) are added with <ulink url="&phpdocbase.html-page2;addHeadLink"><function>addHeadLink</function></ulink> - the first parameter determines the URL, the second the relation. </para> <programlisting role="php"><![CDATA[ <?php $page->addHeadLink('home.htm', 'Start'); ?> ]]></programlisting> </refsect1> <refsect1 id="package.html.html-page2.headers.css"> <title>Adding CSS - Cascading stylesheets</title> <para> A HTML page may contain two types of stylesheets: Inline css and a link to external <filename>.css</filename> file. </para> <para> Inline CSS declarations are made with <ulink url="&phpdocbase.html-page2;addStyleDeclaration"><function>addStyleDeclaration</function></ulink> </para> <programlisting role="php"><![CDATA[ $page->addStyleDeclaration(' div.block { border: 1px solid #000; } '); ]]></programlisting> <para> Links to external CSS files are created by using <ulink url="&phpdocbase.html-page2;addStyleSheet"><function>addStyleSheet</function></ulink>. The optional third parameter determines which media type the stylesheet shall be used for. </para> <programlisting role="php"><![CDATA[ <?php $page->addStyleSheet('css/dark.css'); $page->addStyleSheet('css/print.css', 'text/css', 'print'); ?> ]]></programlisting> </refsect1> <refsect1 id="package.html.html-page2.headers.scripts"> <title>Adding scripts</title> <para> You may want to add some javascript code to your page; either inline or link to an external <filename>.js</filename> file. </para> <para> Inline code blocks are added with <ulink url="&phpdocbase.html-page2;addScriptDeclaration"><function>addScriptDeclaration</function></ulink> . The optional second parameter defaults to <literal>text/javascript</literal> but can be changed as needed. </para> <programlisting role="php"><![CDATA[ <?php $page->addScriptDeclaration(' function javaScriptTest() { alert("Test"); } '); ?> ]]></programlisting> <para> Links to external script files are created by using <ulink url="&phpdocbase.html-page2;addScript"><function>addScript</function></ulink>. </para> <programlisting role="php"><![CDATA[ <?php $page->addScript('js/functions.js'); ?> ]]></programlisting> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-page2/output.xml?view=markup&rev=1.1 Index: peardoc/en/package/html/html-page2/output.xml +++ peardoc/en/package/html/html-page2/output.xml <?xml version='1.0' encoding='utf-8' ?> <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-page2.output"> <refnamediv> <refname>Output</refname> <refpurpose>Finishing the page</refpurpose> </refnamediv> <refsect1 id="package.html.html-page2.output.description"> <title>Description</title> <para> After adding all the headers and content to the page, you want to get the page to the user. <ulink url="&phpdocbase.html-page2;display"><function>display</function></ulink> directly echoes the page to the browser. </para> <para> If you want to do something with the result page before pushing it to the browser, use <ulink url="&phpdocbase.html-page2;toHtml"><function>toHtml</function></ulink> . It returns the page as string that can be modified further. </para> <programlisting role="php"><![CDATA[ <?php //push it to the browser $page->display(); //or put it into a variable $html = $page->toHtml(); ?> ]]></programlisting> </refsect1> </refentry>