LocalFactory
Remember the factory that was the current at the creation of the object.
Table of Contents
Properties
- $clock : WrapperClock|null
- The clock that generated the current instance (or FactoryImmutable::getDefaultInstance() if none)
Methods
- getClock() : WrapperClock|null
- getFactory() : Factory
- initLocalFactory() : void
- transmitFactory() : T
- Trigger the given action using the local factory of the object, so it will be transmitted to any object also using this trait and calling initLocalFactory() in its constructor.
Properties
$clock
The clock that generated the current instance (or FactoryImmutable::getDefaultInstance() if none)
private
WrapperClock|null
$clock
= null
Methods
getClock()
public
getClock() : WrapperClock|null
Return values
WrapperClock|nullgetFactory()
private
getFactory() : Factory
Return values
FactoryinitLocalFactory()
private
initLocalFactory() : void
transmitFactory()
Trigger the given action using the local factory of the object, so it will be transmitted to any object also using this trait and calling initLocalFactory() in its constructor.
private
transmitFactory(Closure $action) : T
Parameters
- $action : Closure