Skip to content

Commit

Permalink
Merge branch 'docs/6' into develop
Browse files Browse the repository at this point in the history
Forward port #6
  • Loading branch information
michalbundyra committed Jan 9, 2020
2 parents 0b569ce + 4b86f58 commit 1dea3db
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/book/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,19 @@ $injector = new Injector(new Config([
],
'types' => [
'MyClass.A' => [
'typeOf' => MyClass::class
'typeOf' => MyClass::class,
'preferences' => [
FooInterface::class => SpecialFoo::class,,
FooInterface::class => SpecialFoo::class,
],
],
'MyClass.B' => [
'typeOf' => MyClass::class
'typeOf' => MyClass::class,
'preferences' => [
FooInterface::class => Bar::class,,
FooInterface::class => Bar::class,
],
],
],
]);
]));


// The results are:
Expand Down Expand Up @@ -218,7 +218,7 @@ $injector = new Injector(new Config([
],
],
],
]);
]));

// The results are:
$a = $injector->create(MyClass::class); // Constructed with SpecialFoo
Expand Down

0 comments on commit 1dea3db

Please sign in to comment.