ExampleAssembler

Extends \phpDocumentor\Descriptor\Builder\Reflector\AssemblerAbstract

This class collects data from the example tag definition of the Reflection library, tries to find the correlating example file on disk and creates a complete Descriptor from that.

package

Default

Methods

Initializes this assembler with the means to find the example file on disk.

__construct(\phpDocumentor\Descriptor\Example\Finder $finder) 

Assemble DocBlock.

assembleDocBlock(\phpDocumentor\Reflection\DocBlock|null $docBlock, \phpDocumentor\Descriptor\DescriptorAbstract $target) : void
inherited

Arguments

$docBlock

\phpDocumentor\Reflection\DocBlock|null

Creates a new Descriptor from the given Reflector.

create(\phpDocumentor\Reflection\DocBlock\Tag\ExampleTag $data) : \phpDocumentor\Descriptor\Tag\ExampleDescriptor
Throws
\InvalidArgumentException

if the provided parameter is not of type ExampleTag; the interface won't let up typehint the signature.

Arguments

$data

\phpDocumentor\Reflection\DocBlock\Tag\ExampleTag

Response

\phpDocumentor\Descriptor\Tag\ExampleDescriptor

Extracts the package from the DocBlock.

extractPackageFromDocBlock(\phpDocumentor\Reflection\DocBlock $docBlock) : string|null
inherited

Arguments

$docBlock

\phpDocumentor\Reflection\DocBlock

Response

string|null

Returns the builder for this Assembler or null if none is set.

getBuilder() : null|\phpDocumentor\Descriptor\ProjectDescriptorBuilder
inherited

Registers the Builder with this Assembler.

setBuilder(\phpDocumentor\Descriptor\ProjectDescriptorBuilder $builder) : void
inherited

The Builder may be used to recursively assemble Descriptors using the \ProjectDescriptorBuilder::buildDescriptor() method.

Arguments

Properties

finder

finder : \phpDocumentor\Descriptor\Example\Finder

builder

builder : \phpDocumentor\Descriptor\ProjectDescriptorBuilder|null
inherited