PhpRiot
Follow phpriot on Twitter
Sponsored Link
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Zend_Reflection Reference

The various classes in Zend_Reflection mimic the API of PHP's Reflection API - with one important difference. PHP's Reflection API does not provide introspection into docblock annotation tags, nor into parameter variable types or return types.

Zend_Reflection analyzes method docblock annotations to determine parameter variable types and the return type. Specifically, the @param and @return annotations are used. However, you can also check for any other annotation tags, as well as the standard "short" and "long" descriptions.

Each reflection object in Zend_Reflection overrides the getDocblock() method to return an instance of Zend_Reflection_Docblock. This class provides introspection into the docblocks and annotation tags.

Zend_Reflection_File is a new reflection class that allows introspection of PHP files. With it, you can retrieve the classes, functions, and global PHP code contained in the file.

Finally, the various methods that return other reflection objects allow a second parameter, the name of the reflection class to use for the returned reflection object.

Zend Framework