An open API service indexing awesome lists of open source software.

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

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^');
```