InjectionChain
- Full name:
\Qubus\Injector\InjectionChain
Properties
chain
Store the chain of instantiations.
Methods
__construct
Instantiate an InjectionChain object.
Parameters:
Parameter | Type | Description |
---|---|---|
$inProgressMakes | array | Optional. Array of instantiations. |
getChain
Get the chain of instantiations.
Return Value:
Array of instantiations.
getByIndex
Get the instantiation at a specific index.
The first (root) instantiation is 0, with each subsequent level adding 1 more to the index.
Provide a negative index to step back from the end of the chain. Example: getByIndex( -2 )
will return the second-to-last element.
Parameters:
Parameter | Type | Description |
---|---|---|
$index | int | Element index to retrieve. Negative value to fetch from the end of the chain. |
Return Value:
Class name of the element at the specified index. False if index not found.
Throws:
If the index is not a numeric value.
Automatically generated on 2025-10-13