dev-master
9999999-devAnother dependency injection container
BSD-3-Clause
The Requires
- php >=5.6
The Development Requires
dependency injection container di
Wallogit.com
2017 © Pedro Peláez
Another dependency injection container
Another dependency injection container, (*1)
Register services using set and providing an identifier and a factory, (*3)
$application->set('service', function () {
return new stdClass();
});
Access the service anywhere in your application, (*4)
$service = $application->service;
If you want to share the same instance across your application use share, (*5)
$application->share('service', function () {
return new stdClass();
});
You can provide arguments for your services, (*6)
$application->set('person', function ($name) {
$person = new stdClass();
$person->name = $name;
return $person;
});
$person = $application->person('Marco');
Another dependency injection container
BSD-3-Clause
dependency injection container di