svn: /pear/peardoc/trunk/en/package/configuration/config/ avail-container/apache.xml avail-container/generic-conf.xml avail-container/ini-commented.xml avail-container/ini-file.xml avail-container/php-array.xml avail-container/php-constants.xml avail-container/xml.xml avail-container.xml
[email protected] (Christian Weiske) Wed, 02 Mar 2011 07:43:18 +0000
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
cweiske Wed, 02 Mar 2011 07:43:18 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308843
Log:
split config container docs in single files and sections so we are prepared for examples
Changed paths:
A pear/peardoc/trunk/en/package/configuration/config/avail-container/
A pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml
A pear/peardoc/trunk/en/package/configuration/config/avail-container/generic-conf.xml
A pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml
A pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-file.xml
A pear/peardoc/trunk/en/package/configuration/config/avail-container/php-array.xml
A pear/peardoc/trunk/en/package/configuration/config/avail-container/php-constants.xml
A pear/peardoc/trunk/en/package/configuration/config/avail-container/xml.xml
U pear/peardoc/trunk/en/package/configuration/config/avail-container.xml
svn-diffs-308843.txt
(text/x-diff, 21.1 KB)
Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.apache" +> + <info> + <title>Apache</title> + </info> + <para> + Parses and saves Apache configuration files. No options are provided by + this container. + </para> + + <!-- FIXME: example file, example load, example save --> +</section> Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/generic-conf.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/generic-conf.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/generic-conf.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.generic-conf" +> + <info> + <title>GenericConf</title> + </info> + + <para> + Generic configuration files. The equals, comment start and new line + characters in the parser can be customised to match your preferred + configuration format. + </para> + + <table> + <title>Available Options</title> + + <tgroup cols="4"> + <thead> + <row> + <entry>Option</entry> + <entry>Data Type</entry> + <entry>Default value</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>comment</literal></entry> + <entry>&type.string;</entry> + <entry><literal>#</literal></entry> + <entry> + The character that signifies the start of a comment. + </entry> + </row> + + <row> + <entry><literal>equals</literal></entry> + <entry>&type.string;</entry> + <entry><literal>:</literal></entry> + <entry> + The character that separates keys from values. + </entry> + </row> + + <row> + <entry><literal>newline</literal></entry> + <entry>&type.string;</entry> + <entry><literal>\</literal></entry> + <entry> + The character that signifies that a value continues across multiple + lines. + </entry> + </row> + + </tbody> + </tgroup> + </table> + + + <!-- FIXME: example file, example load, example save --> +</section> Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.ini-commented" +> + <info> + <title>IniCommented</title> + </info> + + <para> + Parses standard INI files, maintaining comments within the file. No + options are available for this container. + </para> + + + <!-- FIXME: example file, example load, example save --> +</section> Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-file.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-file.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-file.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.ini-file" +> + <info> + <title>IniFile</title> + </info> + + <para> + Parse standard INI files using PHP's in built + <function>parse_ini_file</function>. Does not read in comments. No + options are available for this container. + </para> + + <!-- FIXME: example file, example load, example save --> +</section> Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/php-array.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/php-array.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/php-array.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.php-array" +> + <info> + <title>PHPArray</title> + </info> + + <para> + Parses PHP Array structures. Can read from a PHP Source file or + from an in memory array. Due to technical limitations, this container + does not parse blank lines or comments when reading from a configuration + file, therefore any information contained within PHP comments will be + lost. + </para> + + <table> + <title>Available Options</title> + + <tgroup cols="4"> + <thead> + <row> + <entry>Option</entry> + <entry>Data Type</entry> + <entry>Default value</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>name</literal></entry> + <entry>&type.string;</entry> + <entry><literal>conf</literal></entry> + <entry> + The name to use for the root configuration variable, both when + parsing and writing PHP source files. + </entry> + </row> + + <row> + <entry><literal>useAttr</literal></entry> + <entry>&type.bool;</entry> + <entry>&true;</entry> + <entry> + Controls whether attributes are parsed and saved. + </entry> + </row> + + </tbody> + </tgroup> + </table> + + <warning> + <para> + Since config files containing php arrays are just included using + the standard php methods, code comments and structure will be + lost when saving. + </para> + </warning> + + <!-- FIXME: example file, example load, example save --> +</section> Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/php-constants.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/php-constants.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/php-constants.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.php-constants" +> + <info> + <title>PHPConstants</title> + </info> + + <para> + Parses a set of PHP <function>define</function> from a PHP source file. + Comments are maintained by this container, although blank lines will be + lost. There are no options for this container. + </para> + + <!-- FIXME: example file, example load, example save --> +</section> Added: pear/peardoc/trunk/en/package/configuration/config/avail-container/xml.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/xml.xml (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/xml.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<section + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="lillet" + xml:id="package.configuration.config.avail-container.xml" +> + <info> + <title>XML</title> + </info> + + <para> + Parses a XML file using <link linkend="package.xml.xml-parser">XML_Parser</link>. + </para> + + <table> + <title>Available Options</title> + + <tgroup cols="4"> + <thead> + <row> + <entry>Option</entry> + <entry>Data Type</entry> + <entry>Default value</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>version</literal></entry> + <entry>&type.string;</entry> + <entry><literal>1.0</literal></entry> + <entry> + The XML version to use. + </entry> + </row> + + <row> + <entry><literal>encoding</literal></entry> + <entry>&type.string;</entry> + <entry><literal>ISO-8859-1</literal></entry> + <entry> + The content encoding to use when parsing and storing data. + </entry> + </row> + + <row> + <entry><literal>name</literal></entry> + <entry>&type.string;</entry> + <entry><literal>conf</literal></entry> + <entry> + As with PHPArray, this defines the name of the global configuration + root. + </entry> + </row> + + <row> + <entry><literal>indent</literal></entry> + <entry>&type.string;</entry> + <entry><literal> </literal></entry> + <entry> + The character used for indentation when writing the XML document, + if any. By default, two spaces are used. + </entry> + </row> + + <row> + <entry><literal>linebreak</literal></entry> + <entry>&type.string;</entry> + <entry><literal>\n</literal></entry> + <entry> + The line-breaking character(s) to use when writing the XML + document. + </entry> + </row> + + <row> + <entry><literal>addDecl</literal></entry> + <entry>&type.bool;</entry> + <entry>&true;</entry> + <entry> + Controls whether the XML declaration is added to the start of the + XML document. + </entry> + </row> + + <row> + <entry><literal>useAttr</literal></entry> + <entry>&type.bool;</entry> + <entry>&true;</entry> + <entry> + Controls whether attributes are parsed and saved. + </entry> + </row> + + <row> + <entry><literal>isFile</literal></entry> + <entry>&type.bool;</entry> + <entry>&true;</entry> + <entry> + If &true;, the first argument to <function>parseConfig</function> + will be taken as the file name for the XML file to load. If + &false;, the argument will be taken as the XML data itself and + parsed accordingly. + </entry> + </row> + + <row> + <entry><literal>useCData</literal></entry> + <entry>&type.bool;</entry> + <entry>&false;</entry> + <entry> + Controls whether data is enclosed in CDATA blocks. + </entry> + </row> + + </tbody> + </tgroup> + </table> + + + <!-- FIXME: example file, example load, example save --> +</section> Modified: pear/peardoc/trunk/en/package/configuration/config/avail-container.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container.xml 2011-03-02 07:07:40 UTC (rev 308842) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container.xml 2011-03-02 07:43:18 UTC (rev 308843) @@ -7,336 +7,20 @@ <info> <title>Available Containers</title> + <subtitle>Supported configuration file types</subtitle> </info> - - <para> - <variablelist> - <varlistentry> - <term><literal>Apache</literal></term> - <listitem> - <para> - Parses and saves Apache configuration files. No options are provided by - this container. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>GenericConf</literal></term> - <listitem> - <para> - Generic configuration files. The equals, comment start and new line - characters in the parser can be customised to match your preferred - configuration format. - <table><title>Available Options</title> - - <tgroup cols="4"> - <thead> - <row> - <entry>Option</entry> - <entry>Data Type</entry> - <entry>Default value</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry> - <quote>comment</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>#</quote> - </entry> - <entry> - The character that signifies the start of a comment. - </entry> - </row> - <row> - <entry> - <quote>equals</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>:</quote> - </entry> - <entry> - The character that separates keys from values. - </entry> - </row> - <row> - <entry> - <quote>newline</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>\</quote> - </entry> - <entry> - The character that signifies that a value continues across multiple - lines. - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - - </listitem> - </varlistentry> - <varlistentry> - <term><literal>IniCommented</literal></term> - <listitem> - <para> - Parses standard INI files, maintaining comments within the file. No - options are available for this container. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>IniFile</literal></term> - <listitem> - <para> - Parse standard INI files using PHP's in built - <function>parse_ini_file</function>. Does not read in comments. No - options are available for this container. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>PHPArray</literal></term> - <listitem> - <para> - Parses PHP Array structures. Can read from a PHP Source file or - from an in memory array. Due to technical limitations, this container - does not parse blank lines or comments when reading from a configuration - file, therefore any information contained within PHP comments will be - lost. - <table><title>Available Options</title> - - <tgroup cols="4"> - <thead> - <row> - <entry>Option</entry> - <entry>Data Type</entry> - <entry>Default value</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry> - <quote>name</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>conf</quote> - </entry> - <entry> - The name to use for the root configuration variable, both when - parsing and writing PHP source files. - </entry> - </row> - <row> - <entry> - <quote>useAttr</quote> - </entry> - <entry> - &type.bool; - </entry> - <entry> - &true; - </entry> - <entry> - Controls whether attributes are parsed and saved. - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - <warning> - <para> - Since config files containing php arrays are just included using - the standard php methods, code comments and structure will be - lost when saving. - </para> - </warning> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>PHPConstants</literal></term> - <listitem> - <para> - Parses a set of PHP <function>define</function> from a PHP source file. - Comments are maintained by this container, although blank lines will be - lost. There are no options for this container. - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><literal>XML</literal></term> - <listitem> - <para> - Parses a XML file using <link linkend="package.xml.xml-parser">XML_Parser</link>. - <table><title>Available Options</title> - - <tgroup cols="4"> - <thead> - <row> - <entry>Option</entry> - <entry>Data Type</entry> - <entry>Default value</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry> - <quote>version</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>1.0</quote> - </entry> - <entry> - The XML version to use. - </entry> - </row> - <row> - <entry> - <quote>encoding</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>ISO-8859-1</quote> - </entry> - <entry> - The content encoding to use when parsing and storing data. - </entry> - </row> - <row> - <entry> - <quote>name</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>conf</quote> - </entry> - <entry> - As with PHPArray, this defines the name of the global configuration - root. - </entry> - </row> - <row> - <entry> - <quote>indent</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote> </quote> - </entry> - <entry> - The character used for indentation when writing the XML document, - if any. By default, two spaces are used. - </entry> - </row> - <row> - <entry> - <quote>linebreak</quote> - </entry> - <entry> - &type.string; - </entry> - <entry> - <quote>\n</quote> - </entry> - <entry> - The line-breaking character(s) to use when writing the XML - document. - </entry> - </row> - <row> - <entry> - <quote>addDecl</quote> - </entry> - <entry> - &type.bool; - </entry> - <entry> - &true; - </entry> - <entry> - Controls whether the XML declaration is added to the start of the - XML document. - </entry> - </row> - <row> - <entry> - <quote>useAttr</quote> - </entry> - <entry> - &type.bool; - </entry> - <entry> - &true; - </entry> - <entry> - Controls whether attributes are parsed and saved. - </entry> - </row> - <row> - <entry> - <quote>isFile</quote> - </entry> - <entry> - &type.bool; - </entry> - <entry> - &true; - </entry> - <entry> - If &true;, the first argument to <function>parseConfig</function> - will be taken as the file name for the XML file to load. If - &false;, the argument will be taken as the XML data itself and - parsed accordingly. - </entry> - </row> - <row> - <entry> - <quote>useCData</quote> - </entry> - <entry> - &type.bool; - </entry> - <entry> - &false; - </entry> - <entry> - Controls whether data is enclosed in CDATA blocks. - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </listitem> - </varlistentry> - </variablelist> - </para> + + <para> + The Config package supports reading and writing to different + <quote>containers</quote> - types of configuration files. + Ini-style configuration files are very common. + </para> + + &package.configuration.config.avail-container.apache; + &package.configuration.config.avail-container.generic-conf; + &package.configuration.config.avail-container.ini-commented; + &package.configuration.config.avail-container.ini-file; + &package.configuration.config.avail-container.php-array; + &package.configuration.config.avail-container.php-constants; + &package.configuration.config.avail-container.xml; </chapter>