ProjectDescriptorBuilder
in package
Builds a Project Descriptor and underlying tree.
Table of Contents
- DEFAULT_PROJECT_NAME = 'Untitled project'
- $assemblerFactory : AssemblerFactory
- $filter : Filter
- $project : ProjectDescriptor
- $apiSpecification : ApiSpecification
- $servicesWithCustomSettings : iteratable<string|int, WithCustomSettings>
- __construct() : mixed
- addVersion() : void
- buildDescriptor() : TDescriptor|null
- Takes the given data and attempts to build a Descriptor from it.
- createApiDocumentationSet() : void
- createProjectDescriptor() : void
- filter() : TDescriptor|null
- Analyzes a Descriptor and alters its state based on its state or even removes the descriptor.
- getAssembler() : AssemblerInterface<TDescriptor, TInput>|null
- Attempts to find an assembler matching the given data.
- getDefaultPackage() : string
- getProjectDescriptor() : ProjectDescriptor
- Returns the project descriptor that is being built.
- setApiSpecification() : void
- setCustomSettings() : void
- setName() : void
- setPartials() : void
- setVisibility() : void
- shouldIncludeSource() : bool
- filterDescriptor() : TDescriptor|null
- Filters a descriptor, validates it, stores the validation results and returns the transmuted object or null if it is supposed to be removed.
Constants
DEFAULT_PROJECT_NAME
public
string
DEFAULT_PROJECT_NAME
= 'Untitled project'
Properties
$assemblerFactory
protected
AssemblerFactory
$assemblerFactory
$filter
protected
Filter
$filter
$project
protected
ProjectDescriptor
$project
$apiSpecification
private
ApiSpecification
$apiSpecification
$servicesWithCustomSettings
private
iteratable<string|int, WithCustomSettings>
$servicesWithCustomSettings
Methods
__construct()
public
__construct(AssemblerFactory $assemblerFactory, Filter $filterManager[, iteratable<string|int, WithCustomSettings> $servicesWithCustomSettings = [] ]) : mixed
Parameters
- $assemblerFactory : AssemblerFactory
- $filterManager : Filter
- $servicesWithCustomSettings : iteratable<string|int, WithCustomSettings> = []
Return values
mixed —addVersion()
public
addVersion(VersionDescriptor $version) : void
Parameters
- $version : VersionDescriptor
Return values
void —buildDescriptor()
Takes the given data and attempts to build a Descriptor from it.
public
buildDescriptor(object $data, class-string<\phpDocumentor\Descriptor\TDescriptor> $type) : TDescriptor|null
Parameters
- $data : object
- $type : class-string<\phpDocumentor\Descriptor\TDescriptor>
Tags
Return values
TDescriptor|null —createApiDocumentationSet()
public
createApiDocumentationSet(Project $project) : void
Parameters
- $project : Project
Return values
void —createProjectDescriptor()
public
createProjectDescriptor() : void
Return values
void —filter()
Analyzes a Descriptor and alters its state based on its state or even removes the descriptor.
public
filter(TDescriptor $descriptor) : TDescriptor|null
Parameters
- $descriptor : TDescriptor
Tags
Return values
TDescriptor|null —getAssembler()
Attempts to find an assembler matching the given data.
public
getAssembler(TInput $data, class-string<\phpDocumentor\Descriptor\TDescriptor> $type) : AssemblerInterface<TDescriptor, TInput>|null
Parameters
- $data : TInput
- $type : class-string<\phpDocumentor\Descriptor\TDescriptor>
Tags
Return values
AssemblerInterface<TDescriptor, TInput>|null —getDefaultPackage()
public
getDefaultPackage() : string
Return values
string —getProjectDescriptor()
Returns the project descriptor that is being built.
public
getProjectDescriptor() : ProjectDescriptor
Return values
ProjectDescriptor —setApiSpecification()
public
setApiSpecification(ApiSpecification $apiSpecification) : void
Parameters
- $apiSpecification : ApiSpecification
Return values
void —setCustomSettings()
public
setCustomSettings(array<string, string> $customSettings) : void
Parameters
- $customSettings : array<string, string>
Return values
void —setName()
public
setName(string $title) : void
Parameters
- $title : string
Return values
void —setPartials()
public
setPartials(Collection<string|int, string> $partials) : void
Parameters
- $partials : Collection<string|int, string>
Return values
void —setVisibility()
public
setVisibility(int $visibility) : void
Parameters
- $visibility : int
Return values
void —shouldIncludeSource()
public
shouldIncludeSource() : bool
Return values
bool —filterDescriptor()
Filters a descriptor, validates it, stores the validation results and returns the transmuted object or null if it is supposed to be removed.
protected
filterDescriptor(TDescriptor $descriptor) : TDescriptor|null
Parameters
- $descriptor : TDescriptor