library re-action-di
React PHP framework DI
digit-soft/re-action-di
React PHP framework DI
- Wednesday, July 11, 2018
- by digitv
- Repository
- 1 Watchers
- 0 Stars
- 10 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Re-action DI
Dependency injection container for re-action framework
Usage
//Creation
$container = new \Reaction\DI\Container([
'definitions' => [
'componentId' => [
'class' => 'Component\Class\Path',
'property_1' => 1,
'property_2' => InstanceOf('Component\Class\Path2'),
],
//Alias
'componentAlias' => 'componentId',
],
'singletons' => [
'componentId2' => 'componentId2',
],
]);
//Set entry
$container->set('component', ['class' => '...'], [...]);
//Get entry
$cmp = $container->get('componentId');
//Singletons
$cmp2 = $container->get('componentId2');
$cmp3 = $container->get('componentId2');
echo $cmp2 === $cmp3; //TRUE
dev-master
9999999-dev
React PHP framework DI
Sources
Download
MIT
The Requires
by
Digit
dependency injection
di
reactphp
digit-soft
react php framework
re-action
1.0.0
1.0.0.0
React PHP framework DI
Sources
Download
MIT
The Requires
by
Digit
dependency injection
di
reactphp
digit-soft
react php framework
re-action