mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Add example on writing your own Tag and prepare for TagFactory objects
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
require_once(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Serializer;
|
||||
@@ -18,6 +19,9 @@ DOCCOMMENT;
|
||||
$factory = DocBlockFactory::createInstance();
|
||||
$docblock = $factory->create($docComment);
|
||||
|
||||
$serializer = new Serializer();
|
||||
// Create the serializer that will reconstitute the DocBlock back to its original form.
|
||||
$serializer = new Serializer();
|
||||
|
||||
// Reconstitution is performed by the `getDocComment()` method.
|
||||
$reconstitutedDocComment = $serializer->getDocComment($docblock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user