AssemblerFactory

Attempts to retrieve an Assembler for the provided criteria.

package

Default

Methods

Retrieves a matching Assembler based on the provided criteria or null if none was found.

get(mixed $criteria) : \phpDocumentor\Descriptor\Builder\AssemblerInterface|null

Arguments

$criteria

mixed

Response

\phpDocumentor\Descriptor\Builder\AssemblerInterface|null

Registers an assembler instance to this factory.

register(callable $matcher, \phpDocumentor\Descriptor\Builder\AssemblerInterface $assembler) : void

Arguments

$matcher

callable

A callback function accepting the criteria as only parameter and which must return a boolean.

$assembler

\phpDocumentor\Descriptor\Builder\AssemblerInterface

An instance of the Assembler that will be returned if the callback returns true with the provided criteria.

Registers an assembler instance to this factory that is to be executed after all other assemblers have been checked.

registerFallback(callable $matcher, \phpDocumentor\Descriptor\Builder\AssemblerInterface $assembler) : void

Arguments

$matcher

callable

A callback function accepting the criteria as only parameter and which must return a boolean.

$assembler

\phpDocumentor\Descriptor\Builder\AssemblerInterface

An instance of the Assembler that will be returned if the callback returns true with the provided criteria.

Properties

assemblers

assemblers : array<mixed,mixed>
var

Type(s)

array<mixed,mixed>

fallbackAssemblers

fallbackAssemblers : 

Type(s)