thruster/data-modifier-bundle

Thruster DataModifier Bundle

1.0.0 2015-12-05 15:36 UTC

This package is auto-updated.

Last update: 2024-11-14 04:05:18 UTC


README

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

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

The Thruster DataModifier Bundle.

Install

Via Composer

$ composer require thruster/data-modifier-bundle

Usage

This bundle wraps DataModifier Component and provides support for modifiers as tagged services.

Example configuration:

<service id="some_modifier" class="SomeModifier">
    <tag name="thruster_data_modifier" group="first_group"/>
    <tag name="thruster_data_modifier" group="second_group" priority="2"/>
</service>


<service id="another_modifier" class="AnotherModifier">
    <tag name="thruster_data_modifier" group="first_group"/>
    <tag name="thruster_data_modifier" group="second_group" priority="1"/>
</service>

Usage:

$this->container->get('thruster_data_modifiers')->getGroup('first_group')->modify($input);

Using provided trait:

use DataModifiersAwareTrait;
//...
$this->getDataModifierGroup('second_group')->modify($input);

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.