Change your working directory to phpdoc/doc-base/scripts/docgen/
and execute:
php docgen.php -e simplexml -o outdir
It creates the skeletons that you edit, and then commit.
Help is available with following command: php docgen.php -h
.
No! Edit the files, to check the generated content and add more information, before committing. Thinking that it is okay to commit the skeleton files because you will soon come along and flesh them out might seem like a good idea. However, temporary often becomes permanent.
There are bugs with certain versions of libxml that cause this, so hacks exist to get around it.
To execute the hack, pass in: $ php configure.php --disable-segfault-error
.
Note: This disables some error checking and beautification but raw errors will be shown.
Note: Usually the problem is a major XML syntax issue.
Yes, just go to edit.php.net. Our wiki contains an overview of the editor and how to use it.
Use <methodname>Class::method</methodname>
. Note that the case does not matter when adding a link.
Add the role="noversion"
to its <refentry>
. Example:
<refentry xml:id="reserved.variables.argc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
All external links are added to doc-base/entities/global.ent
. Markup looks as follows:
<!ENTITY url.google "http://www.google.com/">
Then you can use this syntax in the documentation:
Check out <link xlink:href="&url.google;">Google</link>
Be sure the file understands the xlink
namespace, by using xmlns:xlink="http://www.w3.org/1999/xlink"
in the document element.
Typically titles are useful for notes, but it's not required.
<note>
<title>Foo</title>
<para>Note contents are here.</para>
</note>
Version information for functions is stored inside versions.xml
within
each extension (e.g. phpdoc/en/extname/versions.xml
). Changes to functions,
like added parameters, are documented within the changelog section for each page.
Like normal, except methodparam
receives the choice="opt"
attribute, and
the <initializer>
tag is used to signify the default value.
<methodparam choice="opt"><type>bool</type><parameter>httponly</parameter><initializer>false</initializer></methodparam>
The &example.outputs.similar;
entity is used when the output may differ between executions or machines.
The &example.outputs;
entity output will always, under all conditions, be the same.
Add the snippet to en/language-snippets.ent
as an entity and link to the entity within the desired pages.
This is done so translators can update one version of this text.
Missing functions (no associated XML files) can be found like so (assuming a doc checkout, and PhD is installed):
php doc-base/configure.php
phd --docbook doc-base/.manual.xml --package PHP --format php
php doc-base/scripts/check-missing-docs.php -d output/index.sqlite
If you just fixed the build of an old translation, it works locally, but it's not updated on the docs
mirror, make sure that you removed broken-language.txt
from the root of your translation.
No, these are auto-generated by the configure process, also do not commit them.
Examples: entities/file-entities.ent
and en/reference/foo/entities.bar.xml
*.xml = svn:eol-style=native;svn:keywords=Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL