Re: docBlock Parser RFC
| From: | Chad Fulton | Date: | Thu, 16 Sep 2010 23:25:18 +0000 |
| Subject: | Re: docBlock Parser RFC | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49741@lists.php.net to get a copy of this message | ||
Hello!
That is a good point, there would be no file-level doc block in the
RFC. Here is my reasoning for not including it in the RFC:
Since the motivation for this came from the desire for metadata for
PHP structures, it seemed inappropriate to include metadata at the
file level (since it's not a php structure).
As for the @Validator('blahbla'), I had thought it could be replicated with:
/**
* @Validator blahbla
*/
How to do multiple arguments would be up to user-land functions that
used the parsed doc comments, but one possibility is:
/**
* @Validator foo bar baz
*/
then when you wanted to retrieve these, you could do explode(' ',
$tags['Validator']); or similar.
However, more specific syntax could be added to allow "arguments" in
the doc block tags. I just feel like in this case absolute simplicity
is important.
Chad
On Thu, Sep 16, 2010 at 2:23 PM, Christian Kaps
<christian.kaps@mohiva.com> wrote:
> Hi Chad,
>
> the RFC looks for me like a built-in PHPDocumentor parser. This can be
> useful. The problem for me is that I cannot parse the file level doc
> block. What is with tags like @Validator('blabla'). I cannot find an
> example for this scenario.
>
> Greetings,
> Christian
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>