https://github.com/troytft/mapper
Mapper is a PHP library for mapping data to objects, type of property can be configured by annotation
https://github.com/troytft/mapper
mapper php
Last synced: about 1 year ago
JSON representation
Mapper is a PHP library for mapping data to objects, type of property can be configured by annotation
- Host: GitHub
- URL: https://github.com/troytft/mapper
- Owner: troytft
- License: apache-2.0
- Created: 2019-08-23T21:54:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-05T23:18:22.000Z (about 5 years ago)
- Last Synced: 2025-03-30T21:32:29.511Z (over 1 year ago)
- Topics: mapper, php
- Language: PHP
- Homepage:
- Size: 211 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Mapper
Mapper is a PHP library for mapping data to objects, type of property can be configured by annotation
### Features
* Supports scalar types: integer, float, boolean, string
* Supports any nesting level using object and collection types
* Supports work with dates
* Allows write your own types
* Allows define nullability of property
### Usage
```php
'Taxi 2',
'releases' => [
[
'country' => 'France',
'date' => '2000-03-25'
],
]
];
$mapper->map($model, $data);
```
### Requirements
* PHP 7.4 or higher
### Installation
```bash
composer require troytft/mapper
```
### Documentation
Full documentation can be found at [`docs/main.md`](docs/main.md)