FileAssembler extends AssemblerAbstract
Assembles an FileDescriptor using an FileReflector and ParamDescriptors.
Table of Contents
Properties
- $builder : ProjectDescriptorBuilder|null
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.
- addClasses() : void
- Registers the child classes with the generated File Descriptor.
- addConstants() : void
- Registers the child constants with the generated File Descriptor.
- addFunctions() : void
- Registers the child functions with the generated File Descriptor.
- addInterfaces() : void
- Registers the child interfaces with the generated File Descriptor.
- addTraits() : void
- Registers the child traits with the generated File Descriptor.
- assembleDocBlock() : void
- Assemble DocBlock.
- extractPackageFromDocBlock() : string|null
- Extracts the package from the DocBlock.
- overridePackageTag() : void
- addEnums() : void
- Registers the child classes with the generated File Descriptor.
- hadDocumentedElements() : bool
- isEffectivelyEmpty() : bool
Properties
$builder
protected
ProjectDescriptorBuilder|null
$builder
Methods
__construct()
public
__construct(AssemblerReducer ...$reducers) : mixed
Parameters
- $reducers : AssemblerReducer
buildDescriptor()
Creates a Descriptor from the provided data.
public
buildDescriptor(File $data) : TDescriptor|null
Parameters
- $data : File
Return values
TDescriptor|nullcreate()
Creates a Descriptor from the provided data.
public
create(TInput $data) : TDescriptor|null
Parameters
- $data : TInput
Return values
TDescriptor|nulldeduplicateTypes()
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|nullgetBuilder()
Returns the builder for this Assembler or null if none is set.
public
getBuilder() : ProjectDescriptorBuilder|null
Return values
ProjectDescriptorBuilder|nullsetBuilder()
Registers the Builder with this Assembler.
public
setBuilder(ProjectDescriptorBuilder $builder) : void
The Builder may be used to recursively assemble Descriptors using the method.
Parameters
- $builder : ProjectDescriptorBuilder
addClasses()
Registers the child classes with the generated File Descriptor.
protected
addClasses(Class_[] $classes, FileInterface $fileDescriptor) : void
Parameters
- $classes : Class_[]
- $fileDescriptor : FileInterface
addConstants()
Registers the child constants with the generated File Descriptor.
protected
addConstants(Constant[] $constants, FileInterface $fileDescriptor) : void
Parameters
- $constants : Constant[]
- $fileDescriptor : FileInterface
addFunctions()
Registers the child functions with the generated File Descriptor.
protected
addFunctions(Function_[] $functions, FileInterface $fileDescriptor) : void
Parameters
- $functions : Function_[]
- $fileDescriptor : FileInterface
addInterfaces()
Registers the child interfaces with the generated File Descriptor.
protected
addInterfaces(Interface_[] $interfaces, FileInterface $fileDescriptor) : void
Parameters
- $interfaces : Interface_[]
- $fileDescriptor : FileInterface
addTraits()
Registers the child traits with the generated File Descriptor.
protected
addTraits(Trait_[] $traits, FileInterface $fileDescriptor) : void
Parameters
- $traits : Trait_[]
- $fileDescriptor : FileInterface
assembleDocBlock()
Assemble DocBlock.
protected
assembleDocBlock(DocBlock|null $docBlock, DescriptorAbstract|PropertyHookDescriptor $target) : void
Parameters
- $docBlock : DocBlock|null
- $target : DescriptorAbstract|PropertyHookDescriptor
extractPackageFromDocBlock()
Extracts the package from the DocBlock.
protected
extractPackageFromDocBlock(DocBlock|null $docBlock) : string|null
Parameters
- $docBlock : DocBlock|null
Return values
string|nulloverridePackageTag()
protected
overridePackageTag(File $data, FileInterface $fileDescriptor) : void
Parameters
- $data : File
- $fileDescriptor : FileInterface
addEnums()
Registers the child classes with the generated File Descriptor.
private
addEnums(Enum_[] $enums, FileInterface $fileDescriptor) : void
Parameters
- $enums : Enum_[]
- $fileDescriptor : FileInterface
hadDocumentedElements()
private
hadDocumentedElements(File $data) : bool
Parameters
- $data : File
Return values
boolisEffectivelyEmpty()
private
isEffectivelyEmpty(FileInterface $fileDescriptor) : bool
Parameters
- $fileDescriptor : FileInterface