ProjectDescriptorBuilder
in package
Builds a Project Descriptor and underlying tree.
Table of Contents
Constants
- DEFAULT_PROJECT_NAME = 'Untitled project'
Properties
- $assemblerFactory : AssemblerFactory
- $filter : Filter
- $project : ProjectDescriptor
- $apiSpecification : ApiSpecification
- $defaultPackageName : string
- $servicesWithCustomSettings : iterable<string|int, mixed>
Methods
- __construct() : mixed
- addVersion() : void
- buildDescriptor() : TDescriptor|null
- Takes the given data and attempts to build a Descriptor from it.
- createProjectDescriptor() : void
- getAssembler() : AssemblerInterface<TDescriptor, TInput>|null
- Attempts to find an assembler matching the given data.
- getDefaultPackageName() : string
- getProjectDescriptor() : ProjectDescriptor
- Returns the project descriptor that is being built.
- populateApiDocumentationSet() : void
- setCustomSettings() : void
- setName() : void
- setPartials() : void
- setVisibility() : void
- usingApiSpecification() : void
- usingDefaultPackageName() : void
- 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
final mixed
DEFAULT_PROJECT_NAME
= 'Untitled project'
Properties
$assemblerFactory
protected
AssemblerFactory
$assemblerFactory
$filter
protected
Filter
$filter
$project
protected
ProjectDescriptor
$project
$apiSpecification
private
ApiSpecification
$apiSpecification
$defaultPackageName
private
string
$defaultPackageName
$servicesWithCustomSettings read-only
private
iterable<string|int, mixed>
$servicesWithCustomSettings
= []
Methods
__construct()
public
__construct(AssemblerFactory $assemblerFactory, Filter $filterManager[, iterable<string|int, WithCustomSettings> $servicesWithCustomSettings = [] ]) : mixed
Parameters
- $assemblerFactory : AssemblerFactory
- $filterManager : Filter
- $servicesWithCustomSettings : iterable<string|int, WithCustomSettings> = []
addVersion()
public
addVersion(VersionDescriptor $version) : void
Parameters
- $version : VersionDescriptor
buildDescriptor()
Takes the given data and attempts to build a Descriptor from it.
public
buildDescriptor(object $data, TDescriptor> $type) : TDescriptor|null
Parameters
- $data : object
- $type : TDescriptor>
Tags
Return values
TDescriptor|nullcreateProjectDescriptor()
public
createProjectDescriptor() : void
getAssembler()
Attempts to find an assembler matching the given data.
public
getAssembler(TInput $data, TDescriptor> $type) : AssemblerInterface<TDescriptor, TInput>|null
Parameters
- $data : TInput
- $type : TDescriptor>
Return values
AssemblerInterface<TDescriptor, TInput>|nullgetDefaultPackageName()
public
getDefaultPackageName() : string
Return values
stringgetProjectDescriptor()
Returns the project descriptor that is being built.
public
getProjectDescriptor() : ProjectDescriptor
Return values
ProjectDescriptorpopulateApiDocumentationSet()
public
populateApiDocumentationSet(ApiSetDescriptor $apiSet, Project $project) : void
Parameters
- $apiSet : ApiSetDescriptor
- $project : Project
setCustomSettings()
public
setCustomSettings(array<string, string> $customSettings) : void
Parameters
- $customSettings : array<string, string>
setName()
public
setName(string $title) : void
Parameters
- $title : string
setPartials()
public
setPartials(Collection<string|int, string> $partials) : void
Parameters
- $partials : Collection<string|int, string>
setVisibility()
public
setVisibility(int $visibility) : void
Parameters
- $visibility : int
usingApiSpecification()
public
usingApiSpecification(ApiSpecification $apiSpecification) : void
Parameters
- $apiSpecification : ApiSpecification
usingDefaultPackageName()
public
usingDefaultPackageName(string $name) : void
Parameters
- $name : string
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