]> granicus.if.org Git - php/commitdiff
documentation generation improvements
authorHartmut Holzgraefe <hholzgra@php.net>
Wed, 23 Apr 2003 16:29:32 +0000 (16:29 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Wed, 23 Apr 2003 16:29:32 +0000 (16:29 +0000)
scripts/ext_skel_ng/extension_parser.php

index 19c50a05dff68b6bf85562249b3a2e29581aef38..ef2691d847a4baa246aca3c4c78f835c386d80a9 100644 (file)
                // {{{   docbook documentation
 
                function generate_documentation() {
+                       $id_name = str_replace('_', '-', $this->name);
+
                        system("rm -rf {$this->name}/manual");
                        mkdir("{$this->name}/manual");
 
-                       $docdir = "{$this->name}/manual/".$this->name;
+                       $docdir = "{$this->name}/manual/$id_name";
                        mkdir($docdir);
 
                        $fp = fopen("$docdir/reference.xml", "w");
                        fputs($fp,
 "<?xml version='1.0' encoding='iso-8859-1'?>
 <!-- ".'$'."Revision: 1.1 $ -->
- <reference id='ref.{$this->name}'>
+ <reference id='ref.$id_name'>
   <title>{$this->summary}</title>
-  <titleabbrev>{$this->name}</titleabbrev>
+  <titleabbrev>$id_name</titleabbrev>
 
   <partintro>
-   <section id='{$this->name}.intro'>
+   <section id='$id_name.intro'>
     &reftitle.intro;
     <para>
 {$this->description}
     </para>
    </section>
    
-   <section id='{$this->name}.requirements'>
+   <section id='$id_name.requirements'>
     &reftitle.required;
     <para>
     </para>
    </section>
 
 <!-- TODO no configure option support yet
-   &reference.{$this->name}.configure;
+   &reference.$id_name.configure;
 -->
 
-   <section id='{$this->name}.configuration'>
+   <section id='$id_name.configuration'>
     &reftitle.runtime;
 ");
 
                } else {
                        fputs($fp, 
 "    <table>
-     <title>{$this->name} runtime configuration</title>
+     <title>$id_name runtime configuration</title>
                        <tgroup cols='3'>
                         <thead>
         <row>
                fputs($fp,
 "   </section>
 
-   <section id='{$this->name}.resources'>
+   <section id='$id_name.resources'>
     &reftitle.resources;
 ");
 
   fputs($fp,
 "   </section>
 
-   <section id='{$this->name}.constants'>
+   <section id='$id_name.constants'>
     &reftitle.constants;
 ");
   if(empty($this->constants)) {
   } else {
     fputs($fp, 
 "    <table>
-     <title>{$this->name} constants</title>
+     <title>$id_name constants</title>
       <tgroup cols='3'>
        <thead>
         <row>
    
   </partintro>
 
-&reference.{$this->name}.functions;
+&reference.$id_name.functions;
 
  </reference>
 ");