PHPackages                             szwss/reflection-docblock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. szwss/reflection-docblock

ActiveLibrary

szwss/reflection-docblock
=========================

1.0.2(7y ago)0211MITPHPPHP &gt;=5.3.3

Since Jun 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/szwss/reflection-docblock)[ Packagist](https://packagist.org/packages/szwss/reflection-docblock)[ RSS](/packages/szwss-reflection-docblock/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (1)

The ReflectionDocBlock Component [![Build Status](https://camo.githubusercontent.com/64a4ad89134aca3eb5f0d0d55c88dc0ac3274163c334b243cc44ae2667670331/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f706870446f63756d656e746f722f5265666c656374696f6e446f63426c6f636b2e706e67)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock)
==================================================================================================================================================================================================================================================================================================================================================

[](#the-reflectiondocblock-component-)

Introduction
------------

[](#introduction)

The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest).

With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.

> **Note**: *this is a core component of phpDocumentor and is constantly being optimized for performance.*

Installation
------------

[](#installation)

You can install the component in the following ways:

- Use the official Github repository ()
- Via Composer ()

Usage
-----

[](#usage)

The ReflectionDocBlock component is designed to work in an identical fashion to PHP's own Reflection extension ().

Parsing can be initiated by instantiating the `\phpDocumentor\Reflection\DocBlock()` class and passing it a string containing a DocBlock (including asterisks) or by passing an object supporting the `getDocComment()` method.

> *Examples of objects having the `getDocComment()` method are the `ReflectionClass` and the `ReflectionMethod` classes of the PHP Reflection extension*

Example:

```
$class = new ReflectionClass('MyClass');
$phpdoc = new \phpDocumentor\Reflection\DocBlock($class);

```

or

```
$docblock =
