class Item implements ItemInterface

Methods

__construct(string|null $name, mixed $content, ContainerInterface $container, bool $factory = false, bool $resolvedByName = false)

Item constructor.

string|null
getName()

Returns the key of this item.

setName(string $name)

Set the name of this item.

getRaw()

Returns the raw closure, non-executed.

bool
isResolvedByName()

Returns whether this item can be resolved without typehint and instead uses its name for being resolved.

setResolvedByName(bool $resolvableByName)

No description

bool
isFactory()

Whether or not this item is a factory.

setFactory(bool $factory)

No description

setFactoryArgs(mixed ...$args)

Set the arguments to instantiate the factory with.

mixed
getContent(string $dottedPath = '')

Returns the contents of the container.

string
__toString()

String representation of an item.

Details

at line 68
__construct(string|null $name, mixed $content, ContainerInterface $container, bool $factory = false, bool $resolvedByName = false)

Item constructor.

Parameters

string|null $name
mixed $content
ContainerInterface $container
bool $factory
bool $resolvedByName

at line 88
string|null getName()

Returns the key of this item.

Return Value

string|null

at line 100
Item setName(string $name)

Set the name of this item.

Parameters

string $name

Return Value

Item

at line 112
Closure getRaw()

Returns the raw closure, non-executed.

Return Value

Closure

at line 123
bool isResolvedByName()

Returns whether this item can be resolved without typehint and instead uses its name for being resolved.

Return Value

bool

at line 133
Item setResolvedByName(bool $resolvableByName)

Parameters

bool $resolvableByName

Return Value

Item

at line 145
bool isFactory()

Whether or not this item is a factory.

Return Value

bool

at line 155
Item setFactory(bool $factory)

Parameters

bool $factory

Return Value

Item

at line 169
Item setFactoryArgs(mixed ...$args)

Set the arguments to instantiate the factory with.

Parameters

mixed ...$args

Return Value

Item

at line 184
mixed getContent(string $dottedPath = '')

Returns the contents of the container.

Parameters

string $dottedPath If the item's content is a multidimensional array, dot notation can be used to fetch a certain part of the array.

Return Value

mixed

at line 207
string __toString()

String representation of an item.

Return Value

string