2014-09-16 19:48:41 +00:00
|
|
|
[<< previous](7-inversion-of-control.md)
|
|
|
|
|
2014-09-16 19:52:08 +00:00
|
|
|
### Dependency Injector
|
2014-09-16 19:48:41 +00:00
|
|
|
|
2014-09-17 19:22:11 +00:00
|
|
|
A dependency injector resolves the dependencies of your class and makes sure that the correct objects are injected when the class is instantiated.
|
|
|
|
|
|
|
|
My favorite injector is [Auryn](https://github.com/rdlowrey/Auryn), so install `rdlowrey/auryn` with composer or use one of the alternatives below:
|
|
|
|
|
|
|
|
[Pimple](http://pimple.sensiolabs.org/), [Orno DI](https://github.com/orno/di), [PHP-DI](https://github.com/mnapoli/PHP-DI)
|
|
|
|
|
|
|
|
to be continued...
|