cvs: peardoc /en/chapters pear2cs.xml
[email protected] ("Arnaud Limbourg")
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <cvsarnaud1196240733@cvsserver> |
arnaud Wed Nov 28 09:05:33 2007 UTC
Modified files:
/peardoc/en/chapters pear2cs.xml
Log:
improve docbook
http://cvs.php.net/viewvc.cgi/peardoc/en/chapters/pear2cs.xml?r1=1.7&r2=1.8&diff_format=u
Index: peardoc/en/chapters/pear2cs.xml
diff -u peardoc/en/chapters/pear2cs.xml:1.7 peardoc/en/chapters/pear2cs.xml:1.8
--- peardoc/en/chapters/pear2cs.xml:1.7 Wed Nov 28 08:59:16 2007
+++ peardoc/en/chapters/pear2cs.xml Wed Nov 28 09:05:33 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<chapter id="pear2cs">
<chapterinfo>
<date>2007-11-26</date>
@@ -226,13 +226,13 @@
<para>
include/require/require_once/include_once is not allowed for loading class
files. Users will be expected to
- load files either with __autoload() or a customized solution for more
- advanced users.
+ load files either with <literal>__autoload()</literal> or a customized
+ solution for more advanced users.
Instead, classes should simply be used. import with a comment describing
- the class's location
- must be used to document all internal dependencies (as written below).
- Instead of:
+ the class's location must be used to document all internal
+ dependencies (as written below). Instead of:
+ </para>
<programlisting role="php">
<![CDATA[
<?php
@@ -249,10 +249,11 @@
?>
]]>
</programlisting>
+ <para>
This allows packages to work without modification no matter how they are
structured on-disk, including running out of a single large file, inside
a phar archive, and provides much-needed flexibility.
- </para>
+ </para>
<sect3 id="pear2cs.rules.requireonce.requirement">
<title>Requirement</title>
<simpara>No Exceptions to this rule</simpara>
@@ -269,7 +270,7 @@
would be confusing. For example, when loading a driver, a graceful exit
via exception
with helpful error message is preferrable to the fatal error:
-
+ </para>
<programlisting role="php">
<![CDATA[
<?php
@@ -281,7 +282,6 @@
?>
]]>
</programlisting>
- </para>
<sect3 id="pear2cs.rules.otherclasses.requirement">
<title>Requirement</title>
<simpara>This rule is optional and is a suggested coding practice</simpara>
@@ -290,8 +290,8 @@
<sect2 id="pear2cs.rules.dirstructure">
<title>Directory structure</title>
- <para>
- Follows the directory structure in the PEAR2 Subversion repository:
+ <para>Follows the directory structure in the PEAR2 Subversion
+ repository:</para>
<programlisting role="doc">
<![CDATA[
PEAR2/Package_Name/
@@ -304,9 +304,10 @@
(php executable files that exemplify package usage)
]]>
</programlisting>
+ <para>
Note that all package.xml files must specify a baseinstalldir of "/" for
the src/ directory:
-
+ </para>
<programlisting role="doc">
<![CDATA[
<contents>
@@ -316,8 +317,6 @@
</contents>
]]>
</programlisting>
-
- </para>
<sect3 id="pear2cs.rules.dirstructure.requirement">
<title>Requirement</title>
<simpara>Exceptions may be made to this rule with approval from the PEAR