Dependency injector that can generate instances using class definitions and configured instance parameters
Constructor
| Parameters: |
|
|---|
Provide a configuration object to configure this instance
| Parameters: | Config – |
|---|---|
| Return type: | void |
@param DefinitionList $definitions
| Return type: | self |
|---|
@return DefinitionList
Set the instance manager
| Parameters: | InstanceManager – |
|---|---|
| Return type: | Di |
@param $name
| Parameters: |
|
|---|---|
| Return type: | array |
Lazy-load a class
Attempts to load the class (or service alias) provided. If it has been loaded before, the previous instance will be returned (unless the service definition indicates shared instances should not be used).
| Parameters: |
|
|---|---|
| Return type: | object|null |
Retrieve a new instance of a class
Forces retrieval of a discrete instance of the given class, using the constructor parameters provided.
| Parameters: |
|
|---|---|
| Return type: | object|null |
| Throws : | ExceptionClassNotFoundException |
| Throws : | ExceptionRuntimeException |
Inject dependencies
| Parameters: |
|
|---|---|
| Return type: | void |
@param object $instance
| Parameters: |
|
|---|---|
| Throws ExceptionRuntimeException: | |
Retrieve a class instance based on class name
Any parameters provided will be used as constructor arguments. If any given parameter is a DependencyReference object, it will be fetched from the container so that the instance may be injected.
| Parameters: |
|
|---|---|
| Return type: | object |
Get an object instance from the defined callback
| Parameters: |
|
|---|---|
| Return type: | object |
| Throws : | ExceptionInvalidCallbackException |
| Throws : | ExceptionRuntimeException |
This parameter will handle any injection methods and resolution of dependencies for such methods
| Parameters: |
|
|---|---|
| Return type: | bool |
Resolve parameters referencing other services
| Parameters: |
|
|---|---|
| Throws ExceptionMissingPropertyException: | |
| Throws ExceptionCircularDependencyException: | |
| Return type: | array |