DataModifier Bundle
[]
(https://github.com/ThrusterIO/data-modifier-bundle/releases)
[]
(LICENSE)
[]
(https://travis-ci.org/ThrusterIO/data-modifier-bundle)
[]
(https://scrutinizer-ci.com/g/ThrusterIO/data-modifier-bundle)
[]
(https://scrutinizer-ci.com/g/ThrusterIO/data-modifier-bundle)
[]
(https://packagist.org/packages/thruster/data-modifier-bundle), (*1)
[]
(mailto:team@thruster.io), (*2)
The Thruster DataModifier Bundle., (*3)
Install
Via Composer, (*4)
``` bash
$ composer require thruster/data-modifier-bundle, (*5)
## Usage
This bundle wraps DataModifier Component and provides support for modifiers as tagged services.
Example configuration:
```xml
<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:, (*6)
$this->container->get('thruster_data_modifiers')->getGroup('first_group')->modify($input);
Using provided trait:, (*7)
use DataModifiersAwareTrait;
//...
$this->getDataModifierGroup('second_group')->modify($input);
Testing
bash
$ composer test
, (*8)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*9)
License
Please see License File for more information., (*10)