Add example on writing your own Tag and prepare for TagFactory objects

This commit is contained in:
Mike van Riel
2015-06-28 11:56:16 +02:00
parent a6ffa93e28
commit 216cf0025f
26 changed files with 246 additions and 24 deletions
+5 -1
View File
@@ -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);