https://github.com/pc-magas/di
A simple depedency Injection Container
https://github.com/pc-magas/di
Last synced: 2 months ago
JSON representation
A simple depedency Injection Container
- Host: GitHub
- URL: https://github.com/pc-magas/di
- Owner: pc-magas
- Created: 2016-10-13T10:15:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-26T12:17:19.000Z (over 7 years ago)
- Last Synced: 2024-04-19T09:56:26.466Z (about 1 year ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Sample Depedency Injection System
In order to work please create the following json:
```
{
"service1":{
class: ^namespace for the class^
depedencies:[^name for the first service^,^name for the second service^,...,^name for the nth service^]
},
.
.
.
"service_n":
{
class: ^namespace for the class^
depedencies:[^name for the first service^,^name for the second service^,...,^name for the nth service^]
}
}
```Into a file.
Then to use it please use:
```php
use DI\Container;
Resolver r= new DIResolver('^path of the json file^');
```