Class Definition
Factory definition.
- Autarky\Container\Factory\Definition implements Autarky\Container\Factory\FactoryInterface
public
|
|
public static
|
|
public static
|
#
getDefaultForCallable( callable $callable, array $params = array() )
Get a default factory for a callable. |
public static
static
|
#
getFromReflection( callable $callable, ReflectionFunctionAbstract $reflectionFunction = null )
Get a new factory definition instance via reflection. |
protected static
|
#
addReflectionArguments(
Add arguments to an existing factory via reflection. |
public
string|null
|
|
public
callable
|
|
public
array
|
|
public
|
#
addScalarArgument( string $name, string $type, boolean $required = true, mixed $default = null )
Add a scalar argument to the factory definition. |
public
|
#
addOptionalScalarArgument( string $name, string $type, mixed $default )
Add an optional scalar argument to the factory definition. |
public
|
#
addClassArgument( string $name, string $class, boolean $required = true )
Add a class argument to the factory definition. |
public
|
#
addOptionalClassArgument( string $name, string $class )
Add an optional class argument to the factory definition. |
public
|
#
addArgument(
Add an argument to the factory definition. |
public
|
|
public
mixed
|
#
invoke(
Invoke the factory. |
public
mixed
|
#
__invoke(
Proxy for the invoke method. Makes the factory definition class callable. |
protected
callable
|
$callable
The callable function/method. |
|
protected
string|null
|
$name
The name of the definition. |
|
protected
array
|
$argumentPositions
Map of argument position => argument |
#
[]
|
protected
array
|
$argumentNames
Map of argument name => argument |
#
[]
|
protected
array
|
$argumentClasses
Map of argument class => argument |
#
[]
|
protected
integer
|
$argumentPosition
The current argument postition. |
#
0
|