Skip to content

Commit 851c908

Browse files
committed
Add documentation on denormalizer dependencies when using the vom factory.
1 parent 8482d29 commit 851c908

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/VOM.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,13 @@ $factory = new \Zolex\VOM\Metadata\Factory\ModelMetadataFactory(/*...*/);
598598
$factory->injectDenormalizerDependency(new \Some\Dependency());
599599
```
600600

601+
If you are using the `VersatileObjectMapperFactory` you can pass the dependencies to the `create` method.
602+
603+
```php
604+
$vom = VersatileObjectMapperFactory::create(null, [new DependencyA(), new DependencyB()]);
605+
```
606+
607+
601608
##### Non-Scalar Denormalizer Arguments
602609

603610
To prevent unnecessary usage of denormalizers when dealing with arrays, the denormalizer methods only accept scalar arguments by default.

0 commit comments

Comments
 (0)