maileryio / cycle-mapper
Cycle ORM 的映射器
dev-master / 1.0.x-dev
2022-03-20 21:42 UTC
Requires
- php: ^7.4
- doctrine/collections: ^1.6
- foxy/foxy: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phan/phan: ^2.4
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-09-21 03:03:16 UTC
README
Cycle ORM 的映射器
Cycle ORM 的映射器
安装
安装此库的首选方式是通过 composer。
运行以下命令之一:
php composer.phar require "maileryio/cycle-mapper"
或添加以下内容到您的 composer.json 文件中的 require 部分:
"maileryio/cycle-mapper": "*"
使用方法
/** * @Cycle\Annotated\Annotation\Table( * columns = { * "created_at": @Cycle\Annotated\Annotation\Column(type = "datetime"), * "updated_at": @Cycle\Annotated\Annotation\Column(type = "datetime") * } * ) */ class SubscriberMapper extends ChainedMapper { /** * {@inheritdoc} */ protected function getChainItemList(): ChainItemList { return new ChainItemList([ (new Timestamped()) ->withCreatedAt('created_at') ->withUpdatedAt('updated_at'), ]); } }
许可证
本项目按照 BSD-3-Clause 许可协议发布。更多信息请参阅 此处。了解更多 这里。
版权 © 2020, Mailery (https://mailery.io)