TypeCollectionAssembler

Extends \phpDocumentor\Descriptor\Builder\Reflector\AssemblerAbstract

Creates a Collection of type-related value objects for the given Type Collection from the Reflector.

package

Default

Methods

Assemble DocBlock.

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

Arguments

$docBlock

\phpDocumentor\Reflection\DocBlock|null

Wraps the given Descriptor inside a Collection Descriptor of type array and returns that.

convertToArrayDescriptor(\phpDocumentor\Descriptor\DescriptorAbstract $descriptor) : \phpDocumentor\Descriptor\Type\CollectionDescriptor

Creates a Descriptor from the provided data.

create(\phpDocumentor\Reflection\DocBlock\Type\Collection $data) : \phpDocumentor\Descriptor\Collection

Arguments

$data

\phpDocumentor\Reflection\DocBlock\Type\Collection

Response

\phpDocumentor\Descriptor\Collection

Creates a Type ValueObject (Descriptor) for the provided type string.

createDescriptorForType(string $type) : \phpDocumentor\Descriptor\DescriptorAbstract

Arguments

$type

string

Response

\phpDocumentor\Descriptor\DescriptorAbstract

Extracts the package from the DocBlock.

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

Arguments

$docBlock

\phpDocumentor\Reflection\DocBlock

Response

string|null

Returns the value-type from an array notation.

extractTypeFromArrayNotation(string $type) : string

Arguments

$type

string

Response

string

Returns the class name of the Value Object class associated with a given type or false if the type is unknown.

findClassNameForType(string $type) : string|boolean

Arguments

$type

string

Response

string|boolean

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

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

Detects if the given string representing a type equals an array.

isArrayNotation(string $type) : boolean

Arguments

$type

string

Response

boolean

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

a mapping of types to class names of the Value Object class that describes each type

typeToValueObjectClassName : array<mixed,string>
var

a mapping of types to class names of the Value Object class that describes each type

Type(s)

array<mixed,string>

builder

builder : \phpDocumentor\Descriptor\ProjectDescriptorBuilder|null
inherited