cvs: peardoc /en/package/xml xml-beautifier.xml /en/package/xml/xml-beautifier options.xml /en/package/xml/xml-beautifier/xml-beautifier
formatfile.xml formatstring.xml resetoptions.xml setoption.xml setoptions.xml

From: Date: Sun, 21 Dec 2003 16:38:54 +0000
Subject: cvs: peardoc /en/package/xml xml-beautifier.xml /en/package/xml/xml-beautifier options.xml /en/package/xml/xml-beautifier/xml-beautifier
formatfile.xml formatstring.xml resetoptions.xml setoption.xml setoptions.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-2061@lists.php.net to get a copy of this message
schst Sun Dec 21 11:38:54 2003 EDT Added files: /peardoc/en/package/xml/xml-beautifier/xml-beautifier resetoptions.xml setoption.xml setoptions.xml Modified files: /peardoc/en/package/xml xml-beautifier.xml /peardoc/en/package/xml/xml-beautifier options.xml /peardoc/en/package/xml/xml-beautifier/xml-beautifier formatfile.xml formatstring.xml Log: added docs for new methods (v1.0)

Index: peardoc/en/package/xml/xml-beautifier.xml diff -u peardoc/en/package/xml/xml-beautifier.xml:1.2 peardoc/en/package/xml/xml-beautifier.xml:1.3 --- peardoc/en/package/xml/xml-beautifier.xml:1.2 Sat Dec 20 14:30:35 2003 +++ peardoc/en/package/xml/xml-beautifier.xml Sun Dec 21 11:38:52 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <sect1 id="package.xml.xml-beautifier"> <title>XML_Beautifier</title> @@ -11,6 +11,9 @@ &package.xml.xml-beautifier.example; &package.xml.xml-beautifier.options; &package.xml.xml-beautifier.xml-beautifier.xml-beautifier; + &package.xml.xml-beautifier.xml-beautifier.setoption; + &package.xml.xml-beautifier.xml-beautifier.setoptions; + &package.xml.xml-beautifier.xml-beautifier.resetoptions; &package.xml.xml-beautifier.xml-beautifier.apiversion; &package.xml.xml-beautifier.xml-beautifier.formatfile; &package.xml.xml-beautifier.xml-beautifier.formatstring; Index: peardoc/en/package/xml/xml-beautifier/options.xml diff -u peardoc/en/package/xml/xml-beautifier/options.xml:1.3 peardoc/en/package/xml/xml-beautifier/options.xml:1.4 --- peardoc/en/package/xml/xml-beautifier/options.xml:1.3 Sun Dec 21 11:22:58 2003 +++ peardoc/en/package/xml/xml-beautifier/options.xml Sun Dec 21 11:38:53 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.xml.xml-beautifier.options"> <refnamediv> <refname>Options</refname> @@ -18,6 +18,9 @@ <para> Options can be passed as an associative array to the <link linkend="package.xml.xml-beautifier.xml-beautifier.xml-beautifier">constructor of XML_Beautifier</link>. + You may also use <link linkend="package.xml.xml-beautifier.xml-beautifier.setoption"><function>setOption</function></link>, + or <link linkend="package.xml.xml-beautifier.xml-beautifier.setoption"><function>setOptions</function></link> to set + one or more options after the instance of XML_Beautifier has been created. </para> </refsect1> <refsect1 id="package.xml.xml-beautifier.options.refsect2"> @@ -106,6 +109,31 @@ </programlisting> </example> </refsect1> + + <refsect1 id="package.xml.xml-beautifier.options.example2"> + <title>Options example setting options at a later point</title> + <simpara> + The following example shows how to set options for XML_Beautifier, + if the instance already has been created. + </simpara> + <example> + <title>XML_Beautifier options</title> + <programlisting role="php"> + <![CDATA[require_once "XML/Beautifier.php"; +$fmt = new XML_Beautifier(); +$options = array( + "caseFolding" => true, + "caseFoldingTo" => "uppercase", + "normalizeComments" => true + ); + +$fmt->setOptions($options); +$fmt->setOption("indent", "\t"); +$result = $fmt->formatFile('originalFile.xml', 'outputFile.xml'); +]]> + </programlisting> + </example> + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: Index: peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatfile.xml diff -u peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatfile.xml:1.1 peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatfile.xml:1.2 --- peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatfile.xml:1.1 Sat Dec 20 14:30:37 2003 +++ peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatfile.xml Sun Dec 21 11:38:54 2003 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.xml.xml-beautifier.xml-beautifier.formatfile"> <refnamediv> <refname><function>XML_Beautifier::formatFile</function></refname> - <refpurpose>return API version</refpurpose> + <refpurpose>beautify a file</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> Index: peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatstring.xml diff -u peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatstring.xml:1.1 peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatstring.xml:1.2 --- peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatstring.xml:1.1 Sat Dec 20 14:30:37 2003 +++ peardoc/en/package/xml/xml-beautifier/xml-beautifier/formatstring.xml Sun Dec 21 11:38:54 2003 @@ -1,8 +1,8 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.xml.xml-beautifier.xml-beautifier.formatstring"> <refnamediv> <refname><function>XML_Beautifier::formatString</function></refname> - <refpurpose>return API version</refpurpose> + <refpurpose>beautify a string</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> Index: peardoc/en/package/xml/xml-beautifier/xml-beautifier/resetoptions.xml +++ peardoc/en/package/xml/xml-beautifier/xml-beautifier/resetoptions.xml <!-- $Revision: 1.1 $ --> <refentry id="package.xml.xml-beautifier.xml-beautifier.reresetoptions"> <refnamediv> <refname><function>XML_Beautifier::reresetOptions</function></refname> <refpurpose>set an Option</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'XML/Beautifier.php'; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>XML_Beautifier::resetOptions</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.resetoptions.desc"> &title.desc; <para> Reset all options to their default values. </para> <para> See <link linkend="package.xml.xml-beautifier.options">XML_Beautifier options</link> for more information. </para> </refsect1> <refsect1 id="package.default.xml-beautifier.xml-beautifier.resetoptions.param"> &title.param; <para>This method does not accept any parameters.</para> </refsect1> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.resetoptions.return"> &title.returns; <para> <emphasis>void</emphasis> </para> </refsect1> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.resetoptions.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- 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 --> Index: peardoc/en/package/xml/xml-beautifier/xml-beautifier/setoption.xml +++ peardoc/en/package/xml/xml-beautifier/xml-beautifier/setoption.xml <!-- $Revision: 1.1 $ --> <refentry id="package.xml.xml-beautifier.xml-beautifier.setoption"> <refnamediv> <refname><function>XML_Beautifier::setOption</function></refname> <refpurpose>set an Option</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'XML/Beautifier.php'; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>XML_Beautifier::setOption</function></funcdef> <paramdef>string <parameter>$option</parameter></paramdef> <paramdef>mixed <parameter>$value</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.setoption.desc"> &title.desc; <para> Set an option for the beautifying process. </para> <para> See <link linkend="package.xml.xml-beautifier.options">XML_Beautifier options</link> for more information. </para> </refsect1> <refsect1 id="package.default.xml-beautifier.xml-beautifier.setoption.param"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $option</parameter> - name of the option </para> </listitem> <listitem> <para> <parameter>mixed $value</parameter> - value of the option </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.setoption.return"> &title.returns; <para> <emphasis>void</emphasis> </para> </refsect1> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.setoption.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- 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 --> Index: peardoc/en/package/xml/xml-beautifier/xml-beautifier/setoptions.xml +++ peardoc/en/package/xml/xml-beautifier/xml-beautifier/setoptions.xml <!-- $Revision: 1.1 $ --> <refentry id="package.xml.xml-beautifier.xml-beautifier.setoptions"> <refnamediv> <refname><function>XML_Beautifier::setOptions</function></refname> <refpurpose>set an Option</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'XML/Beautifier.php'; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>XML_Beautifier::setOptions</function></funcdef> <paramdef>array <parameter>$options</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.setoptions.desc"> &title.desc; <para> Set several options for the beautifying process. </para> <para> See <link linkend="package.xml.xml-beautifier.options">XML_Beautifier options</link> for more information. </para> </refsect1> <refsect1 id="package.default.xml-beautifier.xml-beautifier.setoptions.param"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>array $options</parameter> - associative array containing options and their values, like you would pass it to the constructor. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.setoptions.return"> &title.returns; <para> <emphasis>void</emphasis> </para> </refsect1> <refsect1 id="package.xml.xml-beautifier.xml-beautifier.setoptions.note"> &title.note; &note.notstatic; </refsect1> </refentry> <!-- 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 -->
« previous php.pear.doc (#2061) next »