Mapper for Cycle ORM
Mapper for Cycle ORM
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.
/**
* @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'),
]);
}
}This project is released under the terms of the BSD-3-Clause license. Read more here.
Copyright © 2020, Mailery (https://mailery.io)