prooph/annotations

为 prooph 添加注解支持

v0.1.0 2017-12-17 16:26 UTC

This package is auto-updated.

Last update: 2024-08-29 04:40:31 UTC


README

Build Status Coverage Status Gitter

此包为 Prooph 添加了对注解的支持。

重要

此库将在 2019 年 12 月 31 日之前得到支持,之后将被弃用。

有关更多信息,请参阅官方公告:[https://www.sasaprolic.com/2018/08/the-future-of-prooph-components.html](https://www.sasaprolic.com/2018/08/the-future-of-prooph-components.html)

特性

  • 几乎不与 Prooph 内部逻辑耦合,构建聚合和事件监听器。
  • 可以将任何 POPO(普通的 PHP 对象)用作聚合。

注意:此包被视为实验性的!

用法

待办事项

请参阅example/example.php中的示例。

支持的注解

此包引入了以下注解

  • @AggregateIdentifier

    应放在属性上以指示聚合标识符的位置。

  • @CommandHandler

  • @EventHandler

  • @TargetAggregateIdentifier

    应放在命令(类)的属性或方法上,以指示目标聚合标识符的位置。

POPO 聚合

AggregateLifecycle::recordThat

待办事项

链接

此包部分灵感来源于Axon Framework 3.0