Download the PHP package digitalwindow/dependency-injection without Composer
On this page you can find all versions of the php package digitalwindow/dependency-injection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download digitalwindow/dependency-injection
More information about digitalwindow/dependency-injection
Files in digitalwindow/dependency-injection
Download digitalwindow/dependency-injection
More information about digitalwindow/dependency-injection
Files in digitalwindow/dependency-injection
Vendor digitalwindow
Package dependency-injection
Short Description Easy-to-use Dependency Injection in PHP
License MIT
Package dependency-injection
Short Description Easy-to-use Dependency Injection in PHP
License MIT
Keywords dependency injectiondi
Please rate this library. Is it a good library?
Informations about the package dependency-injection
Awin\DependencyInjection
Dependency injection for PHP
Usage Examples
$injector = new \Awin\DependencyInjection\DependencyInjector;
$injector->configureDependencyParamValue('Foo', 'param1', 'value to use in constructor');
$injector->configureDependencyParamClass('Foo', 'param2', '\Bar');
$foo = $injector->get('Foo')';
Configuration-Free Usage
Simply type-hint the constructor parameters of your dependency, and you needn't offer any configuration information to the injector - it will use reflection to figure out what is needed.
E.g.:
class Foo
{
public function __construct(Bar $param)
{
//...
}
//...
}
$foo = $injector->get('Foo'); // Constructor param retrieved recursively from
// injector at this point, based on type-hint.
All versions of dependency-injection with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.3
The package digitalwindow/dependency-injection contains the following files
Loading the files please wait ....