ProjectDescriptorBuilder

Builds a Project Descriptor and underlying tree.

package

Default

Methods

__construct

__construct(\phpDocumentor\Descriptor\Builder\AssemblerFactory $assemblerFactory, \phpDocumentor\Descriptor\Filter\Filter $filterManager, \Symfony\Component\Validator\Validator $validator) 

Arguments

$validator

\Symfony\Component\Validator\Validator

Takes the given data and attempts to build a Descriptor from it.

buildDescriptor(mixed $data) : \phpDocumentor\Descriptor\DescriptorAbstract|\phpDocumentor\Descriptor\Collection|null
Throws
\InvalidArgumentException

if no Assembler could be found that matches the given data.

Arguments

$data

mixed

Response

\phpDocumentor\Descriptor\DescriptorAbstract|\phpDocumentor\Descriptor\Collection|null

buildFileUsingSourceData

buildFileUsingSourceData( $data) 

Arguments

$data

createProjectDescriptor

createProjectDescriptor() 

Analyzes a Descriptor and alters its state based on its state or even removes the descriptor.

filter(\phpDocumentor\Descriptor\Filter\Filterable $descriptor) : \phpDocumentor\Descriptor\Filter\Filterable

Filters a descriptor, validates it, stores the validation results and returns the transmuted object or null if it is supposed to be removed.

filterAndValidateDescriptor(\phpDocumentor\Descriptor\DescriptorAbstract $descriptor) : \phpDocumentor\Descriptor\DescriptorAbstract|null

Filters each descriptor, validates them, stores the validation results and returns a collection of transmuted objects.

filterAndValidateEachDescriptor(array<mixed,\phpDocumentor\Descriptor\DescriptorAbstract> $descriptor) : \phpDocumentor\Descriptor\Collection

Attempts to find an assembler matching the given data.

getAssembler(mixed $data) : \phpDocumentor\Descriptor\Builder\Reflector\AssemblerAbstract

Returns the project descriptor that is being built.

getProjectDescriptor() : \phpDocumentor\Descriptor\ProjectDescriptor

Verifies whether the given visibility is allowed to be included in the Descriptors.

isVisibilityAllowed(string|integer $visibility) : boolean

This method is used anytime a Descriptor is added to a collection (for example, when adding a Method to a Class) to determine whether the visibility of that element is matches what the user has specified when it ran phpDocumentor.

see \phpDocumentor\Descriptor\ProjectDescriptor

where the visibility is stored and that declares the constants to use.

Arguments

$visibility

string|integer

One of the visibility constants of the ProjectDescriptor class or the words 'public', 'protected', 'private' or 'internal'.

Response

boolean

Map error code to severity.

mapCodeToSeverity(integer $code) : string

Arguments

$code

integer

Response

string

setProjectDescriptor

setProjectDescriptor(\phpDocumentor\Descriptor\ProjectDescriptor $projectDescriptor) 

Arguments

setTranslator

setTranslator(\phpDocumentor\Translator\Translator $translator) : void

Arguments

Validates the contents of the Descriptor and outputs warnings and error if something is amiss.

validate(\phpDocumentor\Descriptor\DescriptorAbstract $descriptor) : \phpDocumentor\Descriptor\Collection

Constants

DEFAULT_PROJECT_NAME

DEFAULT_PROJECT_NAME
var

Properties

assemblerFactory

assemblerFactory : \phpDocumentor\Descriptor\Builder\AssemblerFactory

validator

validator : \Symfony\Component\Validator\Validator
var

Type(s)

\Symfony\Component\Validator\Validator

filter

filter : \phpDocumentor\Descriptor\Filter\Filter

project

project : \phpDocumentor\Descriptor\ProjectDescriptor

translator

translator : \phpDocumentor\Translator\Translator