Skip to content

Commit

Permalink
Merge branch 'main' into 13-activate-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mike4git committed Aug 19, 2024
2 parents 14af3dc + 91a1da3 commit 3a622c2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,20 @@ person.addresses.populator:

There is no new converter but a different populator implementation for this.

### PropertyMappingPopulator & ArrayPropertyMappingPopulator

#### Closure based upon your converter

If you need a Closure which is based upon this Converter (e.g. for PropertyMappingPopulation) you can declare it in this
way and use it in the `PropertyMappingPopulator` configuration as argument for `$mapper`:

```yaml
converter.closure.factory:
class: \Closure
factory: [ '\Closure', 'fromCallable' ]
arguments: [ '@my.converter', 'convert' ]
```

## Context

Sometimes you will need parameterized conversion which is not depending on the objects themselves.
Expand Down

0 comments on commit 3a622c2

Please sign in to comment.