phpDocumentor/ReflectionDocBlock — pull request #6 by boenrobot (2012-09-22 02:57:26+00:00)
Title: Inline tags reflection and formatting.

I've added parsed contents property that basically adds an array with strings and tag objects, which I think will significantly ease the parsing of inline tags.

In terms of performance, the algorithm implemented is the only one of the few I tried that didn't produce any noticeable degradation on my not-very-large projects (which tells me why you haven't done something similar earlier...). The situation can probably be improved if getTags() is removed, and parsing is made to occur only the first time getParsedContents() is called.

I was thinking about actually making some further progress by translating the tag objects to something markdown can handle, but I'm thinking... should getFormattedContent() even be in ReflectionDocBlock? I mean, what about other formats, or if someone doesn't want any sort of handling at all? There's certainly no config option for any of that, even though the API allows for the latter.

I'm thinking perhaps of moving "text parsing" (you know, like markdown and HTML...) somewhere in PhpDocumentor core - using an interface(s)/abstract class(es) of some sort - with markdown being just the option included in the core plugin.

Thoughts?