FunctionAssembler

in package
extends AssemblerAbstract

Assembles a FunctionDescriptor from a FunctionReflector.

Properties

protected$builder  : \phpDocumentor\Descriptor\ProjectDescriptorBuilder|null                

protected$argumentAssembler  : \phpDocumentor\Descriptor\Builder\Reflector\ArgumentAssembler                

Methods

publicstaticdeduplicateTypes(Type|null $type) : Type|null

Parameters

$type : Type|null

Returns

Type|null
Inherited from
\phpDocumentor\Descriptor\Builder\Reflector\AssemblerAbstract
deprecated

the functionality in this method has been moved to the Compound type in the latest unreleased version of the TypeResolver library

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

publicgetBuilder() : ProjectDescriptorBuilder|null

Registers the Builder with this Assembler.

publicsetBuilder(ProjectDescriptorBuilder $builder) : void

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

Parameters

$builder : ProjectDescriptorBuilder

Initializes this assembler and its dependencies.

public__construct(ArgumentAssembler $argumentAssembler) : mixed

Parameters

$argumentAssembler : ArgumentAssembler

Returns

mixed

Creates a Descriptor from the provided data.

publiccreate(Function_ $data) : FunctionDescriptor

Parameters

$data : Function_

Returns

FunctionDescriptor

Assemble DocBlock.

protectedassembleDocBlock(DocBlock|null $docBlock, DescriptorAbstract $target) : void

Parameters

$docBlock : DocBlock|null
$target : DescriptorAbstract

Extracts the package from the DocBlock.

protectedextractPackageFromDocBlock(DocBlock|null $docBlock) : string|null

Parameters

$docBlock : DocBlock|null

Returns

string|null

Maps the properties of the Function reflector onto the Descriptor.

protectedmapReflectorPropertiesOntoDescriptor(Function_ $reflector, FunctionDescriptor $descriptor) : void

Parameters

$reflector : Function_
$descriptor : FunctionDescriptor

Converts each argument reflector to an argument descriptor and adds it to the function descriptor.

protectedaddArgumentsToFunctionDescriptor(\phpDocumentor\Reflection\Php\Argument[] $arguments, FunctionDescriptor $functionDescriptor) : void

Parameters

$arguments : \phpDocumentor\Reflection\Php\Argument[]
$functionDescriptor : FunctionDescriptor

Adds the given argument to the function.

protectedaddArgumentDescriptorToFunction(FunctionDescriptor $functionDescriptor, ArgumentDescriptor $argumentDescriptor) : void

Parameters

$functionDescriptor : FunctionDescriptor
$argumentDescriptor : ArgumentDescriptor

Creates a new ArgumentDescriptor from the given Reflector and Param.

protectedcreateArgumentDescriptor(FunctionDescriptor $functionDescriptor, Argument $argument) : ArgumentDescriptor

Parameters

$functionDescriptor : FunctionDescriptor
$argument : Argument

Returns

ArgumentDescriptor