doc:skeletons:structure
Normal procedural extension skeleton
Note: For the new OOP model, see also the proposed OOP model
File structure
lang/reference/extname/
- book.xml (See xml:id=“ref.extname”)
- setup.xml (See xml:id=“extname.setup”)
- constants.xml (See xml:id=“extname.constants”)
- examples.xml (See xml:id=“extname.examples”)
- reference.xml (See xml:id=“functions.extname”)
The new "container file" (reference.xml currently) will be "book.xml":
... <book xml:id="ref.extname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> ... <preface xml:id="intro.extname"> ... </preface> &reference.extname.setup; &reference.extname.constants; &reference.extname.examples; &reference.extname.reference; </book>
Which will be expanded to
<?xml version="1.0" encoding="utf-8"?> <!-- $Revision:$ --> <book xml:id="ref.extname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Extname</title> <titleabbrev>Extname...</titleabbrev> <preface xml:id="extname.intro"> &reftitle.intro; <para> Short introduction. </para> </preface> <chapter xml:id="extname.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.setup; <section xml:id="extname.requirements"> &reftitle.required; &no.requirement; </section> <section xml:id="extname.installation"> &reftitle.install; &no.install; </section> <section xml:id="extname.configuration"> &reftitle.runtime; &no.config; </section> <section xml:id="extname.resources"> &reftitle.resources; &no.resource; </section> </chapter> <appendix xml:id="extname.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.constants; &no.constants; </appendix> <appendix xml:id="extname.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.examples; <section xml:id="extname.examples.basic"> <title>Basic usage of this extension</title> <example xml:id="extname.examples.basic-1"> <title>Extname example#1</title> <programlisting role="php"> <![CDATA[ <?php extname_function(); ?> ]]> </programlisting> </example> </section> </appendix> <!-- If this extension defines functions then use this reference --> <reference xml:id="functions.extname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Extname &Functions;</title> <!-- Use when there is something to tell about, warnings/notes/tips maybe.. <partintro xml:id="extname.foobar"> &reftitle.....; <para> ... </para> </partintro> --> &reference.extname.functions.entities; </reference> <!-- If the extension defines any classess then use this (see http://doc.php.net/wiki/skeletons/oo) --> &reference.extname.classname; &reference.extname.class2name; </book> <!-- 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 indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"~/.phpdoc/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 -->
doc/skeletons/structure.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1