Menu

## LocalFactory

LocalFactory.php : 24

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

LocalFactory.php : 29

The clock that generated the current instance (or FactoryImmutable::getDefaultInstance() if none)

`private WrapperClock|null $clock = null`

### Methods

#### getClock()

LocalFactory.php : 31
`public getClock() : WrapperClock|null`

##### Return values

WrapperClock|null

#### getFactory()

LocalFactory.php : 63
`private getFactory() : Factory`

##### Return values

Factory

#### initLocalFactory()

LocalFactory.php : 36
`private initLocalFactory() : void`

#### transmitFactory()

LocalFactory.php : 51

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

##### Tags

template

  T

##### Return values

T

## Search results