\phpDocumentor\Descriptor\BuilderAssemblerFactory

Attempts to retrieve an Assembler for the provided criteria.

Summary

Methods
Properties
Constants
register()
registerFallback()
get()
No public properties found
No constants found
No protected methods found
$assemblers
$fallbackAssemblers
N/A
No private methods found
No private properties found
N/A

Properties

$assemblers

$assemblers : array<mixed,mixed>

Type

array<mixed,mixed>

$fallbackAssemblers

$fallbackAssemblers : 

Type

Methods

register()

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

Registers an assembler instance to this factory.

Parameters

callable $matcher

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

\phpDocumentor\Descriptor\Builder\AssemblerInterface $assembler

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

registerFallback()

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

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

Parameters

callable $matcher

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

\phpDocumentor\Descriptor\Builder\AssemblerInterface $assembler

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

get()

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

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

Parameters

mixed $criteria

Returns

\phpDocumentor\Descriptor\Builder\AssemblerInterface|null