File: vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php

Recommend this page to a friend!
  Classes of Renato De Oliveira Lucena  >  PHP Pokemon Script  >  vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php  >  Download  
File: vendor/phpdocumentor/reflection-docblock/examples/03-reconstituting-a-docblock.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Pokemon Script
Provides an API to manage a database of Pokemons
Author: By
Last change:
Date: 2 years ago
Size: 744 bytes


Class file image Download

require_once(__DIR__ . '/../vendor/autoload.php');


$docComment = <<<DOCCOMMENT
 * This is an example of a summary.
 * And here is an example of the description
 * of a DocBlock that can span multiple lines.
 * @see \phpDocumentor\Reflection\DocBlock\StandardTagFactory

$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docComment);

// 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);

For more information send a message to info at phpclasses dot org.