2017 © Pedro Peláez
 

library reflection-docblock

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

image

phpdocumentor/reflection-docblock

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

  • Wednesday, June 20, 2018
  • by mvriel
  • Repository
  • 16 Watchers
  • 3605 Stars
  • 77,313,053 Installations
  • PHP
  • 409 Dependents
  • 13 Suggesters
  • 61 Forks
  • 3 Open issues
  • 46 Versions
  • 9 % Grown

The README.md

License: MIT Qa workflow Scrutinizer Code Coverage Scrutinizer Code Quality Stable Version Unstable Version, (*1)

ReflectionDocBlock

Introduction

The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser that is 100% compatible with the PHPDoc standard., (*2)

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

Installation

composer require phpdocumentor/reflection-docblock

Usage

In order to parse the DocBlock one needs a DocBlockFactory that can be instantiated using its createInstance factory method like this:, (*4)

$factory  = \phpDocumentor\Reflection\DocBlockFactory::createInstance();

Then we can use the create method of the factory to interpret the DocBlock. Please note that it is also possible to provide a class that has the getDocComment() method, such as an object of type ReflectionClass, the create method will read that if it exists., (*5)

$docComment = <<<DOCCOMMENT
/**
 * This is an example of a summary.
 *
 * This is a Description. A Summary and Description are separated by either
 * two subsequent newlines (thus a whiteline in between as can be seen in this
 * example), or when the Summary ends with a dot (`.`) and some form of
 * whitespace.
 */
DOCCOMMENT;

$docblock = $factory->create($docComment);

The create method will yield an object of type \phpDocumentor\Reflection\DocBlock whose methods can be queried:, (*6)

// Contains the summary for this DocBlock
$summary = $docblock->getSummary();

// Contains \phpDocumentor\Reflection\DocBlock\Description object
$description = $docblock->getDescription();

// You can either cast it to string
$description = (string) $docblock->getDescription();

// Or use the render method to get a string representation of the Description.
$description = $docblock->getDescription()->render();

For more examples it would be best to review the scripts in the /examples folder., (*7)

The Versions

20/06 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

20/06 2018

5.0.0-alpha3

5.0.0.0-alpha3

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

  Sources   Download

MIT

The Requires

 

The Development Requires

14/06 2018

5.0.0-alpha2

5.0.0.0-alpha2

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

  Sources   Download

MIT

The Requires

 

The Development Requires

31/01 2018

5.0.0-alpha1

5.0.0.0-alpha1

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

  Sources   Download

MIT

The Requires

 

The Development Requires

30/11 2017

4.3.0

4.3.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

27/11 2017

4.2.0

4.2.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

10/11 2017

dev-release/3.x

dev-release/3.x

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

  Sources   Download

MIT

The Requires

 

The Development Requires

10/11 2017

3.3.2

3.3.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

11/09 2017

3.3.0

3.3.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

30/08 2017

4.1.1

4.1.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

29/08 2017

3.2.3

3.2.3.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

18/08 2017

4.1.0

4.1.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

08/08 2017

4.0.1

4.0.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

08/08 2017

3.2.2

3.2.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

04/08 2017

4.0.0

4.0.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

04/08 2017

3.2.1

3.2.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

15/07 2017

3.2.0

3.2.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

04/06 2017

dev-feature/bump-type-resolver

dev-feature/bump-type-resolver

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

  Sources   Download

MIT

The Requires

 

The Development Requires

30/09 2016

3.1.1

3.1.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

10/06 2016

3.1.0

3.1.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

10/06 2016

3.0.3

3.0.3.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

06/06 2016

3.0.2

3.0.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

26/02 2016

3.0.1

3.0.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

28/01 2016

3.0.0

3.0.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

25/01 2016

dev-release/2.x

dev-release/2.x

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

25/01 2016

2.0.5

2.0.5.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

22/06 2015

dev-_before-history-rewrite

dev-_before-history-rewrite

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2015

2.0.4

2.0.4.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

09/08 2014

2.0.3

2.0.3.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

28/03 2014

2.0.2

2.0.2.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

05/12 2013

2.0.1

2.0.1.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

07/08 2013

2.0.0

2.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

16/04 2013

2.0.0a3

2.0.0.0-alpha3

  Sources   Download

MIT

The Requires

 

The Development Requires

02/12 2012

2.0.0a2

2.0.0.0-alpha2

  Sources   Download

MIT

The Requires

 

The Development Requires

27/11 2012

2.0.0a1

2.0.0.0-alpha1

  Sources   Download

MIT

The Requires

 

The Development Requires

03/11 2012

1.0.3

1.0.3.0

  Sources   Download

MIT

The Requires

 

10/09 2012

1.0.2

1.0.2.0

  Sources   Download

MIT

The Requires

 

26/07 2012

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

13/07 2012

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

30/06 2012

1.0.0-beta7

1.0.0.0-beta7

  Sources   Download

MIT

The Requires

 

21/06 2012

1.0.0-beta6

1.0.0.0-beta6

  Sources   Download

MIT

The Requires

 

04/06 2012

1.0.0-beta5

1.0.0.0-beta5

  Sources   Download

MIT

The Requires

 

02/06 2012

1.0.0-beta4

1.0.0.0-beta4

  Sources   Download

MIT

The Requires

 

07/04 2012

1.0.0-beta3

1.0.0.0-beta3

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

06/04 2012

1.0.0-beta2

1.0.0.0-beta2

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

06/04 2012

1.0.0-beta1

1.0.0.0-beta1

  Sources   Download

MIT

The Requires

  • php >=5.3.2