https://github.com/dbrekelmans/object-mapper
https://github.com/dbrekelmans/object-mapper
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dbrekelmans/object-mapper
- Owner: dbrekelmans
- Created: 2020-06-05T20:34:37.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-01T20:29:14.000Z (about 4 years ago)
- Last Synced: 2025-03-15T04:39:39.081Z (2 months ago)
- Language: PHP
- Size: 155 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ObjectMapper
## Motivation
Mapping one objects can be a cumbersome and boring task. This object-mapper package provides a structured way to map objects with a consistent implementation.Using your favorite DI container, the `ObjectMapper` is the only service you will ever need to inject. No more thinking about which mapper(s) you need.
## Usage
```php
// Create mapping object as $mapping$objectMapper->register($mapping);
$foo = $objectMapper->map($object, Foo::class);
```## Mapping
See `concept.xml` for the mapping specification.## TODO
- [ ] Implement method mapper
- [ ] Implement constraints
- [ ] Implement transformers
- [ ] 100% unit test coverage
- [ ] Mutation testing