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


Zend_Reflection_Docblock is the heart of Zend_Reflection's value-add over PHP's Reflection API. It provides the following methods:

  • getContents(): returns the full contents of the docblock.

  • getStartLine(): returns the starting position of the docblock within the defining file.

  • getEndLine(): get last line of docblock within the defining file.

  • getShortDescription(): get the short, one-line description (usually the first line of the docblock).

  • getLongDescription(): get the long description from the docblock.

  • hasTag($name): determine if the docblock has the given annotation tag.

  • getTag($name): Retrieve the given annotation tag reflection object, or a boolean FALSE if it's not present.

  • getTags($filter): Retrieve all tags, or all tags matching the given $filter string. The tags returned will be an array of Zend_Reflection_Docblock_Tag objects.

Zend Framework