Download the PHP package nddcoder/object-mapper without Composer
On this page you can find all versions of the php package nddcoder/object-mapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nddcoder/object-mapper
More information about nddcoder/object-mapper
Files in nddcoder/object-mapper
Package object-mapper
Short Description Object mapper for PHP
License MIT
Homepage https://github.com/dangdungcntt/object-mapper
Informations about the package object-mapper
Object mapper
An ObjectMapper
for PHP (inspired by ObjectMapper in java)
Installation
You can install the package via composer:
Usage
Array Property
Use ArrayProperty
Attribute to specific type of array item
Custom JSON property
You can use JsonProperty('<propertyName>')
to custom name for a property
Custom behavior via getter/setter
You can define getter/setter to custom behavior when get/set a property
Encoders
By default, package included 2 encoders for DateTimeInterface
and stdClass
You can create your custom encoder by implements ObjectMapperEncoder
interface
and then using ObjectMapper::addGlobalEncoder
to add it as global or addEncoder
to add it to current instance only
You can remove global encoder using ObjectMapper::removeGlobalEncoder
or removeEncoder
to remove encoder from current instance only
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Dung Nguyen Dang
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of object-mapper with dependencies
ext-json Version *