v0.2-alpha
Pre-release
Pre-release
oliver-schoendorn
released this
05 Sep 14:27
·
23 commits
to master
since this release
Added an alias argument to the share method.
Usage:
<?php
interface ClassInterface {}
class ClassImplementation implements ClassInterface {}
$di = new DependencyInjector(new ReflectionHandler()));
$di->share(new ClassImplementation(), ClassInterface::class);
assert($di->resolve(ClassInterface::class) instanceof ClassImplementation::class);