Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49745 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38801 invoked from network); 17 Sep 2010 08:38:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Sep 2010 08:38:37 -0000 Authentication-Results: pb1.pair.com header.from=mike.vanriel@naenius.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.vanriel@naenius.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain naenius.com designates 83.96.159.14 as permitted sender) X-PHP-List-Original-Sender: mike.vanriel@naenius.com X-Host-Fingerprint: 83.96.159.14 linux35.webawere.nl Linux 2.6 Received: from [83.96.159.14] ([83.96.159.14:46384] helo=linux35.webawere.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 49/73-10701-909239C4 for ; Fri, 17 Sep 2010 04:38:34 -0400 Received: from alm-sara-fw01.unet.nl ([82.148.221.98] helo=[192.168.0.152]) by linux35.webawere.nl with esmtpa (Exim 4.69) (envelope-from ) id 1OwWSQ-0004WB-1V; Fri, 17 Sep 2010 10:38:10 +0200 To: Chad Fulton Cc: internals@lists.php.net In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 17 Sep 2010 10:38:30 +0200 Message-ID: <1284712710.4755.49.camel@mvriel-unet> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Antivirus-Web-Oke.nl: Seems clean. You should still use an Antivirus Scanner Subject: Re: [PHP-DEV] docBlock Parser RFC From: mike.vanriel@naenius.com (Mike van Riel) 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