\phpDocumentor\Descriptor\Builder\ReflectorMethodAssembler

Assembles a MethodDescriptor from a MethodReflector.

Summary

Methods
Properties
Constants
__construct()
create()
deduplicateTypes()
getBuilder()
setBuilder()
No public properties found
No constants found
buildDescriptor()
assembleDocBlock()
extractPackageFromDocBlock()
mapReflectorToDescriptor()
addArguments()
addArgument()
addVariadicArgument()
$builder
N/A
No private methods found
$reducers
$argumentAssembler
N/A

Properties

$builder

$builder : \phpDocumentor\Descriptor\ProjectDescriptorBuilder|null

Type

\phpDocumentor\Descriptor\ProjectDescriptorBuilder|null —

$reducers

$reducers : \phpDocumentor\Descriptor\Builder\AssemblerReducer[]

Type

\phpDocumentor\Descriptor\Builder\AssemblerReducer[] —

$argumentAssembler

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

Type

\phpDocumentor\Descriptor\Builder\Reflector\ArgumentAssembler

Methods

__construct()

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

Initializes this assembler with its dependencies.

Parameters

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

Returns

mixed —

create()

create(\phpDocumentor\Reflection\Php\Method  $data) : \phpDocumentor\Descriptor\Builder\Reflector\TDescriptor|null

Creates a Descriptor from the provided data.

Parameters

\phpDocumentor\Reflection\Php\Method $data

Returns

\phpDocumentor\Descriptor\Builder\Reflector\TDescriptor|null —

deduplicateTypes()

deduplicateTypes(?\phpDocumentor\Reflection\Type  $type) : ?\phpDocumentor\Reflection\Type

Parameters

?\phpDocumentor\Reflection\Type $type

Returns

?\phpDocumentor\Reflection\Type —

getBuilder()

getBuilder() : ?\phpDocumentor\Descriptor\ProjectDescriptorBuilder

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

Returns

?\phpDocumentor\Descriptor\ProjectDescriptorBuilder —

setBuilder()

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

Registers the Builder with this Assembler.

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

Parameters

\phpDocumentor\Descriptor\ProjectDescriptorBuilder $builder

buildDescriptor()

buildDescriptor(\phpDocumentor\Descriptor\Builder\Reflector\TInput  $data) : \phpDocumentor\Descriptor\Builder\Reflector\TDescriptor|null

Parameters

\phpDocumentor\Descriptor\Builder\Reflector\TInput $data

Returns

\phpDocumentor\Descriptor\Builder\Reflector\TDescriptor|null —

assembleDocBlock()

assembleDocBlock(?\phpDocumentor\Reflection\DocBlock  $docBlock, \phpDocumentor\Descriptor\DescriptorAbstract  $target) : void

Assemble DocBlock.

Parameters

?\phpDocumentor\Reflection\DocBlock $docBlock
\phpDocumentor\Descriptor\DescriptorAbstract $target

extractPackageFromDocBlock()

extractPackageFromDocBlock(?\phpDocumentor\Reflection\DocBlock  $docBlock) : ?string

Extracts the package from the DocBlock.

Parameters

?\phpDocumentor\Reflection\DocBlock $docBlock

Returns

?string —

mapReflectorToDescriptor()

mapReflectorToDescriptor(\phpDocumentor\Reflection\Php\Method  $reflector, \phpDocumentor\Descriptor\MethodDescriptor  $descriptor) : void

Maps the fields to the reflector to the descriptor.

Parameters

\phpDocumentor\Reflection\Php\Method $reflector
\phpDocumentor\Descriptor\MethodDescriptor $descriptor

addArguments()

addArguments(\phpDocumentor\Reflection\Php\Method  $reflector, \phpDocumentor\Descriptor\MethodDescriptor  $descriptor) : void

Adds the reflected Arguments to the Descriptor.

Parameters

\phpDocumentor\Reflection\Php\Method $reflector
\phpDocumentor\Descriptor\MethodDescriptor $descriptor

addArgument()

addArgument(\phpDocumentor\Reflection\Php\Argument  $argument, \phpDocumentor\Descriptor\MethodDescriptor  $descriptor) : void

Adds a single reflected Argument to the Method Descriptor.

Parameters

\phpDocumentor\Reflection\Php\Argument $argument
\phpDocumentor\Descriptor\MethodDescriptor $descriptor

addVariadicArgument()

addVariadicArgument(\phpDocumentor\Reflection\Php\Method  $data, \phpDocumentor\Descriptor\MethodDescriptor  $methodDescriptor) : void

Checks if there is a variadic argument in the `@param` tags and adds it to the list of Arguments in the Descriptor unless there is already one present.

Parameters

\phpDocumentor\Reflection\Php\Method $data
\phpDocumentor\Descriptor\MethodDescriptor $methodDescriptor