thruster/data-modifier-bundle

Thruster DataModifier Bundle

1.0.0 2015-12-05 15:36 UTC

This package is auto-updated.

Last update: 2024-09-14 03:38:06 UTC


README

[最新版本] (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.cn/packages/thruster/data-modifier-bundle)

[电子邮件] (mailto:team@thruster.io)

Thruster DataModifier Bundle。

安装

通过Composer

$ composer require thruster/data-modifier-bundle

使用方法

此包封装了DataModifier组件,并提供了对修饰符作为标签服务器的支持。

示例配置

<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>

使用方法

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

使用提供的特质

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

测试

$ composer test

贡献

请参阅贡献指南行为准则以获取详细信息。

许可证

有关更多信息,请参阅许可证文件