On Thu, 2010-09-16 at 13:56 -0700, Chad Fulton wrote:
> Hello,
> 
> Based on comments from the annotations thread, I have created a
> docBlock parser RFC at http://wiki.php.net/rfc/docblockparser
> 
> This RFC does not deal with annotations per se, but only with the idea
> of adding a function to the Reflection extension which would parse
> docBlocks according to a set docBlock syntax into a simple associative
> array containing three elements: short description, long description,
> and an array of tags.
> 
> This is only meant to aid meta-data retrieval for classes and does not
> automatically instantiate anything objects.
> 
> The RFC was meant to conform to existing convention on the formatting
> of docBlocks - so one major way to improve it would be to note any
> inconsistencies with accepted practice.
> 
> Feel free to improve in any other way as well, of course.
> 
> Thanks,
> Chad
> 

Should my vote count: +1
This seems to be a solid enhancement to PHP as I believe it can be
useful in a multitude of situations.

I did miss 2 things while glancing the RFC:
- Inline tags, PHPDocs generally support tags inside the short and long
description (for example: {...@see getTag()} ), see
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_inlinetags.pkg.html
- And a short description may be ended by a dot and newline (.) instead
of a white-line, see
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblock

Bonus would be to also add the docblock template operator but I find it
hard to determine the complexity of this, see
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate

Kind regards,

Mike van Riel


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to