Guides

Enum_ extends AbstractFactory
in package

FinalYes

Table of Contents

Properties

$docBlockFactory  : DocBlockFactoryInterface
$reducers  : iterable<string|int, mixed>

Methods

__construct()  : mixed
create()  : void
Creates an Element out of the given object.
matches()  : bool
Returns true when the strategy is able to handle the object.
createDocBlock()  : DocBlock|null
doCreate()  : object|null
Creates an Element out of the given object.

Properties

$docBlockFactory read-only

protected DocBlockFactoryInterface $docBlockFactory

$reducers read-only

protected iterable<string|int, mixed> $reducers = []

Methods

__construct()

public __construct(DocBlockFactoryInterface $docBlockFactory[, iterable<string|int, Reducer$reducers = [] ]) : mixed
Parameters
$docBlockFactory : DocBlockFactoryInterface
$reducers : iterable<string|int, Reducer> = []

create()

Creates an Element out of the given object.

public create(ContextStack $context, object $object, StrategyContainer $strategies) : void

Since an object might contain other objects that need to be converted the $stategies are passed so it can be used to create nested Elements. The passed ContextStack contains a stack of upstream created Elements that can be manipulated by factories. This allows the factory to also impact on parent objects of earlier created elements.

Parameters
$context : ContextStack

context to set the factory result.

$object : object

object to convert to an Element

$strategies : StrategyContainer

used to convert nested objects.

Attributes
#[Override]

matches()

Returns true when the strategy is able to handle the object.

public matches(ContextStack $context, object $object) : bool
Parameters
$context : ContextStack
$object : object

object to check.

Attributes
#[Override]
Return values
bool

createDocBlock()

protected createDocBlock([Doc|null $docBlock = null ][, Context|null $context = null ]) : DocBlock|null
Parameters
$docBlock : Doc|null = null
$context : Context|null = null
Return values
DocBlock|null

        
On this page

Search results