Definition
in package
implements
ArgumentResolverInterface, DefinitionInterface
Uses
ArgumentResolverTrait, ContainerAwareTrait
Interfaces, Classes and Traits
Table of Contents
- $alias : string
- $arguments : array<string|int, mixed>
- $concrete : mixed
- $container : ContainerInterface
- $leagueContainer : Container
- $methods : array<string|int, mixed>
- $resolved : mixed
- $shared : bool
- $tags : array<string|int, mixed>
- __construct() : mixed
- Constructor.
- 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.
- hasTag() : bool
- Does the definition have a tag?
- isShared() : bool
- Is this a shared definition?
- reflectArguments() : array<string|int, mixed>
- {@inheritdoc}
- resolve() : mixed
- Handle instantiation and manipulation of value and return.
- resolveArguments() : array<string|int, mixed>
- {@inheritdoc}
- setAlias() : DefinitionInterface
- Set the alias of the definition.
- setConcrete() : DefinitionInterface
- Set the concrete of the definition.
- setContainer() : ContainerAwareInterface
- Set a container.
- setLeagueContainer() : self
- Set a container.
- setShared() : self
- Set whether this is a shared definition.
- invokeMethods() : object
- Invoke methods on resolved instance.
- resolveCallable() : mixed
- Resolve a callable.
- resolveClass() : object
- Resolve a class.
Properties
$alias
protected
string
$alias
$arguments
protected
array<string|int, mixed>
$arguments
= []
$concrete
protected
mixed
$concrete
$container
protected
ContainerInterface
$container
$leagueContainer
protected
Container
$leagueContainer
$methods
protected
array<string|int, mixed>
$methods
= []
$resolved
protected
mixed
$resolved
$shared
protected
bool
$shared
= false
$tags
protected
array<string|int, mixed>
$tags
= []
Methods
__construct()
Constructor.
public
__construct(string $id[, mixed $concrete = null ]) : mixed
Parameters
- $id : string
- $concrete : mixed = null
Return values
mixed —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.
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 —reflectArguments()
{@inheritdoc}
public
reflectArguments(ReflectionFunctionAbstract $method[, array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
- $method : ReflectionFunctionAbstract
- $args : array<string|int, mixed> = []
Return values
array<string|int, mixed> —resolve()
Handle instantiation and manipulation of value and return.
public
resolve([bool $new = false ]) : mixed
Parameters
- $new : bool = false
Return values
mixed —resolveArguments()
{@inheritdoc}
public
resolveArguments(array<string|int, mixed> $arguments) : array<string|int, mixed>
Parameters
- $arguments : array<string|int, mixed>
Return values
array<string|int, 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) : ContainerAwareInterface
Parameters
- $container : ContainerInterface
Return values
ContainerAwareInterface —setLeagueContainer()
Set a container.
public
setLeagueContainer(Container $container) : self
Parameters
- $container : Container
Return values
self —setShared()
Set whether this is a shared definition.
public
setShared([bool $shared = true ]) : self
Parameters
- $shared : bool = true
Return values
self —invokeMethods()
Invoke methods on resolved instance.
protected
invokeMethods(object $instance) : object
Parameters
- $instance : object
Return values
object —resolveCallable()
Resolve a callable.
protected
resolveCallable(callable $concrete) : mixed
Parameters
- $concrete : callable
Return values
mixed —resolveClass()
Resolve a class.
protected
resolveClass(string $concrete) : object
Parameters
- $concrete : string