Skip to content

phmLabs/Init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

phmLabs::Init

This library is a very lightweight dependency injection container. The special thing about Init is that it uses names parameters and fits perfectly with yaml files this way.

class MyClass {
  public function __construct($firstParam, $secondParam = null) {
    // ...
  }
}

$options = [
    'class' => 'MyClass',
    'call' => [
      '__construct' => ['secondParam' => 'foo', 'firstParam' => 'bar']
    ]
]

$myClass = Init::initialize($options);

About

Lightweight dependency injection framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages