trait FactoryTrait

Properties

protected bool $isFactory Whether a bind will be a factory.
protected array $factoryArgs Holds the data to be passed as args to the factory.

Methods

$this|Item
factory(bool|Closure|Item $isFactoryOrCallableOrItem = true)

Set factory for upcoming bind or create a factory callable.

withArgs(mixed ...$args)

Set the args to construct the factory with.

setFactoryArgs(string $key)

Set the arguments during fetch-time.

Details

at line 33
$this|Item factory(bool|Closure|Item $isFactoryOrCallableOrItem = true)

Set factory for upcoming bind or create a factory callable.

Parameters

bool|Closure|Item $isFactoryOrCallableOrItem

Return Value

$this|Item

at line 54
FactoryTrait withArgs(mixed ...$args)

Set the args to construct the factory with.

Parameters

mixed ...$args

Return Value

FactoryTrait

at line 68
protected FactoryTrait setFactoryArgs(string $key)

Set the arguments during fetch-time.

Parameters

string $key

Return Value

FactoryTrait