Zend Framework
3.0
|
Container for methods and parameters used by Di to create a particular instance. More...
Public Member Functions | |
__construct ($class, $alias, $constructor, array $params) | |
getName () | |
Retrieves the best available name for this instance (instance alias first then class name) | |
getClass () | |
Class of the instance. | |
getAlias () | |
Alias for the instance (if any) | |
setClass ($class) | |
Set class name. | |
setAlias ($alias) | |
Set instance alias. | |
getConstructor () | |
Get instantiator. | |
getParams () | |
Parameters passed to the instantiator as an ordered list of parameters. | |
setMethods (array $methods) | |
Set methods. | |
addMethod ($method) | |
Add a method called on the instance. | |
getMethods () | |
Retrieves a list of methods that are called on the instance in their call order. | |
setShared ($shared) | |
isShared () | |
Retrieves whether the instance is shared or not. | |
Protected Attributes | |
$class | |
$alias | |
$constructor | |
$params | |
$methods = [] | |
$shared = true | |
Container for methods and parameters used by Di to create a particular instance.
__construct | ( | $class, | |
$alias, | |||
$constructor, | |||
array | $params | ||
) |
string | null | $class | |
string | null | $alias | |
mixed | $constructor | |
array | $params |
addMethod | ( | $method | ) |
getAlias | ( | ) |
Alias for the instance (if any)
getClass | ( | ) |
Class of the instance.
Null if class is unclear (such as when the instance is produced by a callback)
getConstructor | ( | ) |
Get instantiator.
getMethods | ( | ) |
Retrieves a list of methods that are called on the instance in their call order.
Each returned element has form array('method' => 'methodName', 'params' => array( ... ordered list of call parameters ... ), where every call parameter that is a recursively fetched instance is a GeneratorInstance itself
getName | ( | ) |
Retrieves the best available name for this instance (instance alias first then class name)
getParams | ( | ) |
Parameters passed to the instantiator as an ordered list of parameters.
Each parameter that refers to another instance fetched recursively is a GeneratorInstance itself
isShared | ( | ) |
Retrieves whether the instance is shared or not.
setAlias | ( | $alias | ) |
setClass | ( | $class | ) |
Set class name.
In the case of an instance created via a callback, we need to set the class name after creating the generator instance.
string | $class |
setMethods | ( | array | $methods | ) |
setShared | ( | $shared | ) |
bool | $shared |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |