Skip to content

hugoramosandrade/container-di

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of Container Interface PSR-11

Examples

$container = new DI;

//set a bind between a interface and a concrete class
$container->set(SomeInterface::class, ConcreteClass::class);

// retrieve a concrete class from interface
$instance = $container->get(SomeInterface::class);

$instance->doSomethingAwesome();

The get method, of DI container, will resolve automatically all dependencies of a class.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages