barryvdh/reflection-docblock
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
The barryvdh/reflection-docblock is a PHP component that provides a DocBlock parser. It is 100% compatible with the PHPDoc standard. Primarily, this package is designed to facilitate libraries with the ability to offer support for annotations via DocBlocks or to extract information that has been embedded within a DocBlock. It is noteworthy that this is a core component of phpDocumentor and is regularly optimized for performance to ensure enhanced user experience.
The utilization of the barryvdh/reflection-docblock component is seamless and works in the same manner as PHP's own Reflection extension. To use it, you need to instantiate the \phpDocumentor\Reflection\DocBlock()
class, passing it a string containing a DocBlock (including asterisks) or by passing an object that has the getDocComment()
method.
Here are the code usage examples:
$class = new ReflectionClass('MyClass');
$phpdoc = new \phpDocumentor\Reflection\DocBlock($class);
or
$docblock = <<<DOCBLOCK
/**
* This is a short description.
*
* This is a *long* description.
*
* @return void
*/
DOCBLOCK;
$phpdoc = new \phpDocumentor\Reflection\DocBlock($docblock);
For more extensive information and guidelines on this package, you can go through the official Github repository or visit the PHPDoc standard website. These documentation sources extensively encapsulate the complete details of the barryvdh/reflection-docblock component.