thruster/data-mapper-bundle

Thruster Mapper Bundle

2.1.0 2016-02-29 14:39 UTC

This package is auto-updated.

Last update: 2024-09-14 02:40:18 UTC


README

[最新版本] (https://github.com/ThrusterIO/data-mapper-bundle/releases) [软件许可] (LICENSE) [构建状态] (https://travis-ci.org/ThrusterIO/data-mapper-bundle) [代码覆盖率] (https://scrutinizer-ci.com/g/ThrusterIO/data-mapper-bundle) [质量评分] (https://scrutinizer-ci.com/g/ThrusterIO/data-mapper-bundle) [总下载次数] (https://packagist.org.cn/packages/thruster/data-mapper-bundle)

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

Thruster DataMapper Bundle。

安装

通过 Composer

$ composer require thruster/data-mapper-bundle

适用于 PHP < 7.0

对于低于 PHP7 的旧版本 PHP,有 php5 分支

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

使用

此包通过使用标记的服务将 DataMapper 组件封装起来,以实现与 Symfony 的集成。

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

使用提供的 trait

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

测试

$ composer test

贡献

请参阅CONTRIBUTINGCONDUCT以获取详细信息。

许可证

请参阅许可证文件以获取更多信息。