use BoringDI\Container;
$c = new Container();
$c->share('A', function (Container $c) {
return new A($c->get('B'));
});
$c->factory('B', function (Container $c) {
return new B();
});
$c->get('A');
-
Notifications
You must be signed in to change notification settings - Fork 0
nicklasos/BoringDI
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Boring DI container
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published