phpDocumentor

MethodAssembler extends AssemblerAbstract
in package

Assembles a MethodDescriptor from a MethodReflector.

Table of Contents

Properties

$builder  : ProjectDescriptorBuilder|null
$argumentAssembler  : ArgumentAssembler
$reducers  : array<string|int, AssemblerReducer>

Methods

__construct()  : mixed
Initializes this assembler with its dependencies.
buildDescriptor()  : TDescriptor|null
Creates a Descriptor from the provided data.
create()  : TDescriptor|null
Creates a Descriptor from the provided data.
deduplicateTypes()  : Type|null
getBuilder()  : ProjectDescriptorBuilder|null
Returns the builder for this Assembler or null if none is set.
setBuilder()  : void
Registers the Builder with this Assembler.
addArgument()  : void
Adds a single reflected Argument to the Method Descriptor.
addArguments()  : void
Adds the reflected Arguments to the Descriptor.
addVirualVariadicArgument()  : void
Add a virtual argument to the method descriptor if the last `@param` tag is variadic.
assembleDocBlock()  : void
Assemble DocBlock.
extractPackageFromDocBlock()  : string|null
Extracts the package from the DocBlock.
mapReflectorToDescriptor()  : void
Maps the fields to the reflector to the descriptor.

Properties

Methods

buildDescriptor()

Creates a Descriptor from the provided data.

public buildDescriptor(Method $data) : TDescriptor|null
Parameters
$data : Method
Return values
TDescriptor|null

create()

Creates a Descriptor from the provided data.

public create(TInput $data) : TDescriptor|null
Parameters
$data : TInput
Return values
TDescriptor|null

deduplicateTypes()

public static deduplicateTypes(Type|null $type) : Type|null

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

Parameters
$type : Type|null
Return values
Type|null

addVirualVariadicArgument()

Add a virtual argument to the method descriptor if the last `@param` tag is variadic.

protected addVirualVariadicArgument(Method $data, 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
$data : Method
$methodDescriptor : MethodDescriptor

extractPackageFromDocBlock()

Extracts the package from the DocBlock.

protected extractPackageFromDocBlock(DocBlock|null $docBlock) : string|null
Parameters
$docBlock : DocBlock|null
Return values
string|null

mapReflectorToDescriptor()

Maps the fields to the reflector to the descriptor.

protected mapReflectorToDescriptor(Method $reflector, MethodDescriptor $descriptor) : void
Parameters
$reflector : Method
$descriptor : MethodDescriptor

        
On this page

Search results