Download the PHP package zap/injector without Composer
On this page you can find all versions of the php package zap/injector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor zap
Package injector
Short Description A simple Dependency Injector for PHP 5.4+
License MIT
Homepage http://github.com/imarc/zap-injector
Package injector
Short Description A simple Dependency Injector for PHP 5.4+
License MIT
Homepage http://github.com/imarc/zap-injector
Keywords dependency injectiondi
Please rate this library. Is it a good library?
Informations about the package injector
Zap\Injector
A simple dependency injection library
The Zap Injector looks to find the middle ground between the simplicity offered by tiny service locators like Pimple and the real dependency injection libraries like PHP-DI provide.
Why would I use this?
- It handles resolving dependencies and their configuration in order.
- It allows for dependencies to only be loaded on demand.
- It allows configuration to only be loaded on demand, and to be configured from anywhere.
- If you register under parent classes or interfaces, it decouples modules from their dependencies.
Usage:
Also, Injector has an extend
method. Extensions are invoked immediately
after a new instance is constructed from a factory or from a classname:
Changelog
0.x
0.3.0
- Major refactoring and code cleanup.
0.2.0
- Added ->register(), removed ->addFactory(), ->addInstance(), and ->addClass()
- Renamed ->remove() to ->unregister()
- Other refactoring
0.1.1
- Added ->extend() method, similar to Pimple. Callbacks configured with ->extend() are called after an instance is created by a factory.
0.1.0
- Initial Release, full of bugs
All versions of injector with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package zap/injector contains the following files
Loading the files please wait ....