Class Container
Default implementation of the container.
- Autarky\Container\Container implements Autarky\Container\ContainerInterface
public
|
|
public
|
|
public
mixed
|
|
public
mixed
|
|
protected
object
|
#
callFactory(
Call a factory. |
public
|
#
makeFactory( callable $callable, boolean $reflect = false )
Make a new factory definition for a class. |
public
|
#
getFactory( string $class, array $params = array() )
Get the existing factory for a class. If a factory is not already defined a default one will be created via reflection. |
protected
array
|
#
getFunctionArguments( ReflectionFunctionAbstract $func, array $params = array() )
Get an array of arguments to a function, resolving type-hinted arguments automatically on the way. |
protected
object|null
|
#
resolveClassArg( ReflectionClass $class, ReflectionParameter $param, array $params )
Resolve a class type-hinted argument for a funtion. |
protected
mixed
|
#
resolveNonClassArg( ReflectionParameter $param, array $params, ReflectionFunctionAbstract $func )
Resolve a non-class function argument. |
public
|
|
public
|
|
protected
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
boolean
|
|
protected
|
#
checkProtected( string $class, string|null $alias )
Check if a class and its alias (optionally) are protected, and throw an exception if they are. |
protected
boolean
|
protected
array
|
$instances
Resolved instances. |
#
[]
|
protected
array
|
$factories
Factories. |
#
[]
|
protected
array
|
$shared
Classes that should be shared instances. |
#
[]
|
protected
array
|
$aliases
Aliases. |
#
[]
|
protected
array
|
$params
Parameter specifications. |
#
[]
|
protected
array
|
$resolvingCallbacks
Resolving callbacks. |
#
[]
|
protected
array
|
$resolvingAnyCallbacks
More resolving callbacks. |
#
[]
|
protected
array
|
$internals
Internal classes. |
#
[]
|
protected
boolean
|
$protectInternals
Whether internal classes should be protected from resolving or not. |
#
true
|
protected
boolean
|
$autowire
Whether to "autowire" classes or not. |
#
true
|