thruster / data-mapper-bundle
Thruster Mapper Bundle
2.1.0
2016-02-29 14:39 UTC
Requires
- php: >=7.0
- symfony/dependency-injection: >= 2.5
- symfony/http-kernel: >= 2.5
- thruster/data-mapper: ~2.0
Requires (Dev)
- phpunit/phpunit: ~5.0
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)
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
贡献
请参阅CONTRIBUTING和CONDUCT以获取详细信息。
许可证
请参阅许可证文件以获取更多信息。