FunctionAssembler

Extends \phpDocumentor\Descriptor\Builder\Reflector\AssemblerAbstract

Assembles a FunctionDescriptor from a FunctionReflector.

package

Default

Methods

Initializes this assembler and its dependencies.

__construct(\phpDocumentor\Descriptor\Builder\Reflector\ArgumentAssembler $argumentAssembler) 

Adds the given argument to the function.

addArgumentDescriptorToFunction(\phpDocumentor\Descriptor\FunctionDescriptor $functionDescriptor, \phpDocumentor\Descriptor\ArgumentDescriptor $argumentDescriptor) : void

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

addArgumentsToFunctionDescriptor(array<mixed,\phpDocumentor\Reflection\FunctionReflector\ArgumentReflector> $arguments, \phpDocumentor\Descriptor\FunctionDescriptor $functionDescriptor) : void

Arguments

$arguments

array<mixed,\phpDocumentor\Reflection\FunctionReflector\ArgumentReflector>

Assemble DocBlock.

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

Arguments

$docBlock

\phpDocumentor\Reflection\DocBlock|null

Creates a Descriptor from the provided data.

create(\phpDocumentor\Reflection\FunctionReflector $data) : \phpDocumentor\Descriptor\FunctionDescriptor

Arguments

$data

\phpDocumentor\Reflection\FunctionReflector

Response

\phpDocumentor\Descriptor\FunctionDescriptor

Creates a new ArgumentDescriptor from the given Reflector and Param.

createArgumentDescriptor(\phpDocumentor\Descriptor\FunctionDescriptor $functionDescriptor, \phpDocumentor\Reflection\FunctionReflector\ArgumentReflector $argument) : \phpDocumentor\Descriptor\ArgumentDescriptor

Arguments

$argument

\phpDocumentor\Reflection\FunctionReflector\ArgumentReflector

Response

\phpDocumentor\Descriptor\ArgumentDescriptor

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

Retrieves the Fully Qualified Namespace Name from the FunctionReflector.

getFullyQualifiedNamespaceName(\phpDocumentor\Reflection\FunctionReflector $reflector) : string

Reflection library formulates namespace as global but this is not wanted for phpDocumentor itself.

Arguments

$reflector

\phpDocumentor\Reflection\FunctionReflector

Response

string

Maps the properties of the Function reflector onto the Descriptor.

mapReflectorPropertiesOntoDescriptor(\phpDocumentor\Reflection\FunctionReflector $reflector, \phpDocumentor\Descriptor\FunctionDescriptor $descriptor) : void

Arguments

$reflector

\phpDocumentor\Reflection\FunctionReflector

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

argumentAssembler

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

builder

builder : \phpDocumentor\Descriptor\ProjectDescriptorBuilder|null
inherited