DummyFactoryStrategy
in package
implements
ProjectFactoryStrategy
Stub for test purpose only.
Interfaces, Classes and Traits
- ProjectFactoryStrategy
- Interface for strategies used by the project factory to build Elements out of nodes.
Table of Contents
- create() : mixed
- Creates an Element out of the given object.
- matches() : bool
- Returns true when the strategy is able to handle the object.
Methods
create()
Creates an Element out of the given object.
public
create(ContextStack $context, mixed $object, StrategyContainer $strategies) : mixed
Since an object might contain other objects that need to be converted the $factory is passed so it can be used to create nested Elements.
Parameters
- $context : ContextStack
-
context to set the factory result.
- $object : mixed
-
object to convert to an Element
- $strategies : StrategyContainer
-
used to convert nested objects.
Return values
mixed —matches()
Returns true when the strategy is able to handle the object.
public
matches(ContextStack $context, mixed $object) : bool
Parameters
- $context : ContextStack
- $object : mixed
-
object to check.