thruster/data-mapper-bundle

Thruster Mapper Bundle

2.1.0 2016-02-29 14:39 UTC

This package is auto-updated.

Last update: 2024-04-14 01:51:50 UTC


README

[Latest Version] (https://github.com/ThrusterIO/data-mapper-bundle/releases) [Software License] (LICENSE) [Build Status] (https://travis-ci.org/ThrusterIO/data-mapper-bundle) [Code Coverage] (https://scrutinizer-ci.com/g/ThrusterIO/data-mapper-bundle) [Quality Score] (https://scrutinizer-ci.com/g/ThrusterIO/data-mapper-bundle) [Total Downloads] (https://packagist.org/packages/thruster/data-mapper-bundle)

[Email] (mailto:team@thruster.io)

The Thruster DataMapper Bundle.

Install

Via Composer

$ composer require thruster/data-mapper-bundle

For PHP < 7.0

For older PHP version than PHP7 there is branch php5

$ composer require thruster/data-mapper-bundle ">=1.0,<2.0"

Usage

This bundle wraps DataMapper component to provide integration with Symfony by using tagged services.

<service id="some_data_mapper" class="SomeDataMapper">
    <tag name="thruster_data_mapper"/>
</service>
$output = $this->container->get('thruster_data_mappers')->getMapper(SomeMapper::class)->map($input);

Using provided trait

use DataMapperAwareTrait;
//...
$output = $this->getDataMapper(SomeMapper::class)->map($input);

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.