| 1 | <?php |
||
| 20 | class CounterEventSubscriber implements DomainEventSubscriberInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | protected $counter; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return int |
||
| 29 | */ |
||
| 30 | public function counter() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param IncrementCounterEvent $event |
||
| 37 | */ |
||
| 38 | public function onIncrement(IncrementCounterEvent $event) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param DecrementCounterEvent $event |
||
| 45 | */ |
||
| 46 | public function onDecrement(DecrementCounterEvent $event) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | public static function getSubscribedEvents() |
||
| 61 | } |
||
| 62 |