ilya/creator

Automatic dependencies resolution.

2.0.0 2014-06-10 17:15 UTC

This package is not auto-updated.

Last update: 2024-11-09 16:37:32 UTC


README

Build Status

Creator is a thin Reflection API wrapper that allows you to easily instantiate classes.

It will automatically read the constructor's dependencies and inject them into a new instance.

use Creator\Creator;

class Foo {

    public function __construct(AnotherClass $foo, $bar = 42)
    {
       # something here
    }
  
}

# do not want to instantiate it manually? here is what you can do
$foo = Creator::make('Foo'); # => new instance of Foo 

Additional information

Creator is licensed under the MIT license.