Update: phpDocumentor development
| From: | Greg Beaver | Date: | Sun, 01 Dec 2002 04:38:30 +0000 |
| Subject: | Update: phpDocumentor development | ||
| Groups: | php.pear.dev php.pear.doc | ||
| Request: | Send a blank email to pear-dev+get-11271@lists.php.net to get a copy of this message | ||
Hello all,
There have been some issues with the PEAR release of phpDocumentor due to
problems in pear.in for windows which render the project unusable without
minor adjustments. These problems have been fixed and will be available
with the next release. In the meantime, a clean install from
http://www.phpdoc.org will work until the PEAR release is fixed
up.
The peardoc2 converter is now at about 95% complete. The biggest stumbling
blocks were recently solved. The spec for phpDocumentor's descriptions
allows certain html tags for formatting such as <b>, <i>, <ul>, etc. This
required parsing the long description and replacing these with their docbook
equivalents, as well as parsing out paragraphs. Using a derivative of the
parser that phpDocumentor uses to parse php and a new options.ini file for
every template, this problem was solved. The other larger problem involved
a new DocBook format for package-level docs (tutorials would go there).
Currently, the spec calls for html-format package-level docs, but html is
not rigorous enough to convert back into DocBook reliably. By allowing a
subset of DocBook tags (basically everything but the table tags), it is
possible to use the same derivative parser with a few changes to parse
DocBook-style package pages and spit out html-ready or pdf-ready package
pages.
With these solutions, the focus turns to moving the old HTMLdefaultConverter
and its 7 templates into a new Smarty-based converter that will have all the
flexibility of the HTMLSmartyConverter and the old look. After this is
completed, there will simply be a few weeks of ironing out the mistakes that
will inevitably turn out in the peardoc2 templates of the DocBook converter
(unless I just happen to have understood the format perfectly on the first
try), and we will be ready for version 1.2.0rc1
1.2.0 will have a much smoother interface for extending phpDocumentor. All
of the details in phpdoc.inc have been moved either to a new Setup class in
Setup.inc.php or to a separate config file phpDocumentor.ini. In addition,
the lengthy command-line can now be encapsulated in config files in the
user/ subdirectory to allow easy repetition of complicated parsing tasks.
It is now possible to run all output formats at once, saving a huge amount
of parsing time, and extending a Converter to add minor functionality can be
done either through the templates or by extending the Converter class, and
referencing it by -o HTML:Smarty->Smartychild:default where the new template
is named HTMLSmartySmartychildConverter and is located in the subdir
Converters/HTML/Smarty/Smartychild. In addition, the ignore parameter now
successfully ignores subdirectories and parses any * or ? wildcard
Documentation will be smoother with the addition of JavaDoc-style docblock
inheritance. Classes/methods/vars automatically inherit certain tags and
descriptions from the parent in some situations, and the new inline tag
{@inheritdoc} allows extensive control over how, avoiding repetition. In
the same vein, new DocBlock templates allow a large number of similar
functions to have the same DocBlock, and also allow individual comments for
exceptions within the template area. {@link} and @see will also
automatically link to the php manual at php.net, and the new tag @uses
allows automatic cross-referencing. @uses works like @see, but inserts a
@see in the docblock of the element that is used. phpDocumentor can also
automatically determine the root directory of a package when parsing several
files in different directories using the -f commandline. Finally, support
for Zend Studio's quirky @desc tag was added for those who succumb to that
tool's allure (we don't recommend using their PHPDoc tag style, it's not
very flexible)
Look for at least an rc1 by the new year, and probably sooner.
Take care,
Greg Beaver
phpDocumentor developer
http://www.phpdoc.org