cvs: peardoc /de/package/configuration/config intro-editing.xml
| From: | Daniel Convissor | Date: | Mon, 11 Apr 2005 00:48:36 +0000 |
| Subject: | cvs: peardoc /de/package/configuration/config intro-editing.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5922@lists.php.net to get a copy of this message | ||
danielc Sun Apr 10 20:48:36 2005 EDT
Modified files:
/peardoc/de/package/configuration/config intro-editing.xml
Log:
* Tabs to spaces.
* Clean up nesting.
http://cvs.php.net/diff.php/peardoc/de/package/configuration/config/intro-editing.xml?r1=1.2&r2=1.3&ty=u
Index: peardoc/de/package/configuration/config/intro-editing.xml
diff -u peardoc/de/package/configuration/config/intro-editing.xml:1.2
peardoc/de/package/configuration/config/intro-editing.xml:1.3
--- peardoc/de/package/configuration/config/intro-editing.xml:1.2 Sun Apr 10 20:42:33 2005
+++ peardoc/de/package/configuration/config/intro-editing.xml Sun Apr 10 20:48:35 2005
@@ -1,63 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- EN-Revision: 1.2 -->
<refentry id="package.configuration.config.intro-editing">
<refnamediv>
<refname>Konfigurationsdaten bearbeiten</refname>
- <refpurpose>
- Wie Sie Konfigurationsdaten bearbeiten
- </refpurpose>
- </refnamediv>
+ <refpurpose>
+ Wie Sie Konfigurationsdaten bearbeiten
+ </refpurpose>
+ </refnamediv>
+
<refsect1>
<title>Konfigurationsobjekt erzeugen</title>
<para>
Es gibt viele Möglichkeiten Konfigurationsdaten einem
<classname>Config</classname>-Objekt zuzuweisen.
Sie können ein Array übergegeben, wie im nachfolgendem Beispiel gezeigt:
- <example>
+ <example>
<title>Konfiguration mit Array</title>
<programlisting role="php">
<![CDATA[
+// configuration array
- // configuration array
-
- $conf = array('DB' =>
- array('type' => 'mysql',
- 'host' => 'localhost',
- 'user' => 'root',
- 'pass' => 'root')
- );
-
- // Config object
-
- $config = new Config();
- $root =& $config->parseConfig($conf, 'phparray',
- array('name' => 'conf'));
- echo $root->toString('phparray', array('name' =>
'conf'));
-
- ]]>
+$conf = array(
+ 'DB' => array(
+ 'type' => 'mysql',
+ 'host' => 'localhost',
+ 'user' => 'root',
+ 'pass' => 'root'
+ )
+);
+
+// Config object
+
+$config = new Config();
+$root =& $config->parseConfig($conf,
+ 'phparray',
+ array('name' => 'conf'));
+echo $root->toString('phparray', array('name' => 'conf'));
+ ]]>
</programlisting>
- </example>
+ </example>
</para>
<para>
Alternativ können Sie <classname>Config</classname> anweisen, eine Datei zu
öffnen und auszuwerten.
Das ist im nächsten Beispiel anhand einer XML-Datei aufgezeigt:
- <example>
+ <example>
<title>Ein Konfigurationsobjekt aus einer Datei</title>
<programlisting role="php">
<![CDATA[
- // Config object
+// Config object
- $config = new Config();
- $root =& $config->parseConfig('/path/to/file.xml', 'xml');
- echo $root->toString('phparray', array('name' =>
'conf'));
-
- ]]>
+$config = new Config();
+$root =& $config->parseConfig('/path/to/file.xml', 'xml');
+echo $root->toString('phparray', array('name' => 'conf'));
+ ]]>
</programlisting>
- </example>
+ </example>
</para>
</refsect1>
- </refentry>
+</refentry>
+
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml