Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 3283c9a

Browse files
committed
Updated documentation with new factory example and fixed typo
1 parent 7f63f55 commit 3283c9a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

doc/book/config-abstract-factory.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,21 @@ Or within any config provider using:
2020
return [
2121
'service_manager' => [
2222
'abstract_factories' => [
23-
ConfigAbstractFactories::class,
23+
ConfigAbstractFactory::class,
24+
],
25+
],
26+
];
27+
```
28+
29+
It is also possible to use the config abstract factory in the traditional way; by registering
30+
it as a factory for a specific class. This marginally improves performance but loses
31+
the benefit of not needing to create a factory key for all of you configured factories:
32+
33+
```php
34+
return [
35+
'service_manager' => [
36+
'factories' => [
37+
SomeCustomClass::class => ConfigAbstractFactory::class,
2438
],
2539
],
2640
];

0 commit comments

Comments
 (0)