svn: /pear/peardoc/trunk/en/package/configuration/config/ avail-container/apache.xml avail-container/ini-commented.xml examples/apache-read.php
examples/apache-write.php examples/apache-write.txt

From: Date: Thu, 03 Mar 2011 05:36:25 +0000
Subject: svn: /pear/peardoc/trunk/en/package/configuration/config/ avail-container/apache.xml avail-container/ini-commented.xml examples/apache-read.php
examples/apache-write.php examples/apache-write.txt
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-12043@lists.php.net to get a copy of this message
cweiske Thu, 03 Mar 2011 05:36:25 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=308879 Log: first config container apache example and output Changed paths: U pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml U pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml A pear/peardoc/trunk/en/package/configuration/config/examples/ A pear/peardoc/trunk/en/package/configuration/config/examples/apache-read.php A pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.php A pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.txt Modified: pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml 2011-03-03 03:14:20 UTC (rev 308878) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/apache.xml 2011-03-03 05:36:25 UTC (rev 308879) @@ -13,5 +13,30 @@ this container. </para> + <example> + <title>Writing an apache configuration file</title> + <programlisting role="php"> + <xi:include parse="text" + xmlns:xi="http://www.w3.org/2001/XInclude" + href="&package.configuration.config.examples.apache-write.php;" + > + <xi:fallback>FIXME:MISSING XINCLUDE CONTENT</xi:fallback> + </xi:include> + </programlisting> + </example> + + + <example> + <title>Generated configuration file</title> + <programlisting role="ini"> + <xi:include parse="text" + xmlns:xi="http://www.w3.org/2001/XInclude" + href="&package.configuration.config.examples.apache-write.txt;" + > + <xi:fallback>FIXME:MISSING XINCLUDE CONTENT</xi:fallback> + </xi:include> + </programlisting> + </example> + <!-- FIXME: example file, example load, example save --> </section> Modified: pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml 2011-03-03 03:14:20 UTC (rev 308878) +++ pear/peardoc/trunk/en/package/configuration/config/avail-container/ini-commented.xml 2011-03-03 05:36:25 UTC (rev 308879) @@ -10,10 +10,38 @@ </info> <para> - Parses standard INI files, maintaining comments within the file. No - options are available for this container. + Parses standard INI files, maintaining comments within the file. </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>linebreak</literal></entry> + <entry>&type.string;</entry> + <entry><literal>\n</literal></entry> + <entry> + Character(s) used to separate lines from each other. + </entry> + </row> + + </tbody> + </tgroup> + </table> + + + <!-- FIXME: example file, example load, example save --> </section> Added: pear/peardoc/trunk/en/package/configuration/config/examples/apache-read.php =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/examples/apache-read.php (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/examples/apache-read.php 2011-03-03 05:36:25 UTC (rev 308879) @@ -0,0 +1,3 @@ +<?php + +?> \ No newline at end of file Added: pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.php =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.php (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.php 2011-03-03 05:36:25 UTC (rev 308879) @@ -0,0 +1,13 @@ +<?php +require_once 'Config.php'; + +$conf = new Config(); +$root = $conf->getRoot(); +$root->createComment('My virtual host'); + +$vhost = $root->createSection('VirtualHost', array('127.0.0.1:82')); +$vhost->createDirective('DocumentRoot', '/usr/share/www'); +$vhost->createDirective('ServerName', 'my-pear.example.org'); + +$conf->writeConfig(sys_get_temp_dir() . '/dummy-apache.conf', 'apache'); +?> \ No newline at end of file Added: pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.txt =================================================================== --- pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.txt (rev 0) +++ pear/peardoc/trunk/en/package/configuration/config/examples/apache-write.txt 2011-03-03 05:36:25 UTC (rev 308879) @@ -0,0 +1,5 @@ +# My virtual host +<VirtualHost 127.0.0.1:82> + DocumentRoot /usr/share/www + ServerName my-pear.example.org +</VirtualHost>

« previous php.pear.doc (#12043) next »