zendframework/zend-di
zendframework/zend-di is a PHP dependency injection container for Zend Framework apps. It supports autowiring, configurable definitions, and factories to build and wire objects at runtime, helping manage dependencies and improve testability.
Version 2
This is documentation for the legacy version (2.x) of zend-di.
Most of the configuration for both the setup of Definitions as well as the
setup of the InstanceManager can be attained by a configuration file. This
file will produce an array (typically) and have an iterable structure.
The top two keys are 'definition' and 'instance', each specifying values for the definition setup and instance manager setup, respectively.
The definition section expects the following information expressed as a PHP array:
$config = [
'definition' => [
'compiler' => [/* [@todo](https://github.com/todo) compiler information */],
'runtime' => [/* [@todo](https://github.com/todo) runtime information */],
'class' => [
'instantiator' => '', // the name of the instantiator, by default this is __construct
'supertypes' => [], // an array of supertypes the class implements
'methods' => [
'setSomeParameter' => [ // a method name
'parameterName' => [
'name', // string parameter name
'type', // type or null
'is-required', // bool
],
],
],
],
],
];
How can I help you explore Laravel packages today?