DefinitionInterface
extends
ContainerAwareInterface
in
Table of Contents
- addArgument() : self
- Add an argument to be injected.
- addArguments() : self
- Add multiple arguments to be injected.
- addMethodCall() : self
- Add a method to be invoked
- addMethodCalls() : self
- Add multiple methods to be invoked
- addTag() : self
- Add a tag to the definition.
- getAlias() : string
- Get the alias of the definition.
- getConcrete() : mixed
- Get the concrete of the definition.
- getContainer() : ContainerInterface
- Get the container
- getLeagueContainer() : Container
- Get the container. This will be removed in favour of getContainer returning Container in next major release.
- hasTag() : bool
- Does the definition have a tag?
- isShared() : bool
- Is this a shared definition?
- resolve() : mixed
- Handle instantiation and manipulation of value and return.
- setAlias() : DefinitionInterface
- Set the alias of the definition.
- setConcrete() : DefinitionInterface
- Set the concrete of the definition.
- setContainer() : self
- Set a container
- setLeagueContainer() : self
- Set a container. This will be removed in favour of setContainer receiving Container in next major release.
- setShared() : self
- Set whether this is a shared definition.
Methods
addArgument()
Add an argument to be injected.
public
addArgument(mixed $arg) : self
Parameters
- $arg : mixed
Return values
self —addArguments()
Add multiple arguments to be injected.
public
addArguments(array<string|int, mixed> $args) : self
Parameters
- $args : array<string|int, mixed>
Return values
self —addMethodCall()
Add a method to be invoked
public
addMethodCall(string $method[, array<string|int, mixed> $args = [] ]) : self
Parameters
- $method : string
- $args : array<string|int, mixed> = []
Return values
self —addMethodCalls()
Add multiple methods to be invoked
public
addMethodCalls([array<string|int, mixed> $methods = [] ]) : self
Parameters
- $methods : array<string|int, mixed> = []
Return values
self —addTag()
Add a tag to the definition.
public
addTag(string $tag) : self
Parameters
- $tag : string
Return values
self —getAlias()
Get the alias of the definition.
public
getAlias() : string
Return values
string —getConcrete()
Get the concrete of the definition.
public
getConcrete() : mixed
Return values
mixed —getContainer()
Get the container
public
getContainer() : ContainerInterface
Return values
ContainerInterface —getLeagueContainer()
Get the container. This will be removed in favour of getContainer returning Container in next major release.
public
getLeagueContainer() : Container
Return values
Container —hasTag()
Does the definition have a tag?
public
hasTag(string $tag) : bool
Parameters
- $tag : string
Return values
bool —isShared()
Is this a shared definition?
public
isShared() : bool
Return values
bool —resolve()
Handle instantiation and manipulation of value and return.
public
resolve([bool $new = false ]) : mixed
Parameters
- $new : bool = false
Return values
mixed —setAlias()
Set the alias of the definition.
public
setAlias(string $id) : DefinitionInterface
Parameters
- $id : string
Return values
DefinitionInterface —setConcrete()
Set the concrete of the definition.
public
setConcrete(mixed $concrete) : DefinitionInterface
Parameters
- $concrete : mixed
Return values
DefinitionInterface —setContainer()
Set a container
public
setContainer(ContainerInterface $container) : self
Parameters
- $container : ContainerInterface
Return values
self —setLeagueContainer()
Set a container. This will be removed in favour of setContainer receiving Container in next major release.
public
setLeagueContainer(Container $container) : self
Parameters
- $container : Container
Return values
self —setShared()
Set whether this is a shared definition.
public
setShared(bool $shared) : self
Parameters
- $shared : bool