maileryio / cycle-mapper
Mapper for 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-12-21 03:31:42 UTC
README
Mapper for Cycle ORM
Mapper for Cycle ORM
Installation
The preferred way to install this library is through composer.
Either run
php composer.phar require "maileryio/cycle-mapper"
or add
"maileryio/cycle-mapper": "*"
to the require section of your composer.json.
Usage
/** * @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'), ]); } }
License
This project is released under the terms of the BSD-3-Clause license. Read more here.
Copyright © 2020, Mailery (https://mailery.io)