Pro PHP- Patterns, Frameworks, Testing and More

(vip2019) #1
CHAPTER 7 ■ REFLECTION API^103

Using reflection, you can access and parse docblock comments. This chapter’s example
used the docblock tokenizer pecl extension to perform the parsing. Using docblock tags and
some algorithms, you can parse the data into usable arrays.
By extending the reflection API, you can integrate a docblock parser with the reflection
classes to create documenting reflection classes that interpret the data provided in PHPDoc
comments. Similarly, you can add reflection attributes.

McArthur_819-9C07.fm Page 103 Friday, February 22, 2008 8:59 AM

Free download pdf