mirror of
https://github.com/danog/Valinor.git
synced 2025-01-10 14:48:20 +01:00
ad51039cc3
The `Source` class is a new entry point for sources that are not plain array or iterable. It allows accessing other features like camel-case keys or custom paths mapping in a convenient way. It should be used as follows: ```php $source = \CuyZ\Valinor\Mapper\Source\Source::json($jsonString) ->camelCaseKeys() ->map([ 'towns' => 'cities', 'towns.*.label' => 'name', ]); $result = (new \CuyZ\Valinor\MapperBuilder()) ->mapper() ->map(SomeClass::class, $source); ``` |
||
---|---|---|
.. | ||
CamelCaseKeysMappingTest.php | ||
PathMappingTest.php |