From f87b27fd103f7557b1a6c46576cd396b2d4ecd9b Mon Sep 17 00:00:00 2001 From: ob-ivan Date: Tue, 9 Jan 2018 13:34:27 +0300 Subject: [PATCH] Add an example of calling merge --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 5f1a329..0965f83 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,12 @@ You can set a name which will be used to refer to container itself: $container = new SD\DependencyInjection\Container([], 'container'); ``` +If you have several containers, you can create a new one by merging them: + +```php +$mergedContainer = SD\DependencyInjection\Container::merge($container1, $container2); +``` + Registering services -------------------- Services are registered with ServiceInitializers: