phpDocumentor

TraitAssembler extends AssemblerAbstract
in package

Assembles an TraitDescriptor using an TraitReflector.

Table of Contents

Properties

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

Methods

__construct()  : mixed
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.
addConstants()  : void
Registers the child constants with the generated Class Descriptor.
addMethods()  : void
Registers the child methods with the generated Trait Descriptor.
addProperties()  : void
Registers the child properties with the generated Trait Descriptor.
assembleDocBlock()  : void
Assemble DocBlock.
extractPackageFromDocBlock()  : string|null
Extracts the package from the DocBlock.

Properties

Methods

buildDescriptor()

Creates a Descriptor from the provided data.

public buildDescriptor(Trait_ $data) : TDescriptor|null
Parameters
$data : Trait_
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

addConstants()

Registers the child constants with the generated Class Descriptor.

protected addConstants(array<string|int, Constant$constants, TraitDescriptor $traitDescriptor) : void
Parameters
$constants : array<string|int, Constant>
$traitDescriptor : TraitDescriptor

addMethods()

Registers the child methods with the generated Trait Descriptor.

protected addMethods(array<string|int, Method$methods, TraitInterface $traitDescriptor) : void
Parameters
$methods : array<string|int, Method>
$traitDescriptor : TraitInterface

addProperties()

Registers the child properties with the generated Trait Descriptor.

protected addProperties(array<string|int, Property$properties, TraitInterface $traitDescriptor) : void
Parameters
$properties : array<string|int, Property>
$traitDescriptor : TraitInterface

extractPackageFromDocBlock()

Extracts the package from the DocBlock.

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

        
On this page

Search results