An open API service indexing awesome lists of open source software.

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

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)