| 1 | <?php namespace C4tech\RayEmitter\Domain; |
||
| 6 | abstract class Command implements CommandInterface |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * Target aggregate root entity identifier. |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $target_id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Expected sequence version of the target aggregate |
||
| 16 | * @var int |
||
| 17 | */ |
||
| 18 | protected $expected_sequence = -1; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Command data payload. |
||
| 22 | * @var stdClass |
||
| 23 | */ |
||
| 24 | protected $payload; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @inheritDoc |
||
| 28 | */ |
||
| 29 | 1 | public function getAggregateId() |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @inheritDoc |
||
| 36 | */ |
||
| 37 | 1 | public function getExpectedSequence() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @inheritDoc |
||
| 44 | * @return stdClass |
||
| 45 | */ |
||
| 46 | 1 | public function getPayload() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Setup Payload |
||
| 53 | * |
||
| 54 | * Initializes the payload as an empty object. |
||
| 55 | * @return void |
||
| 56 | */ |
||
| 57 | 3 | protected function setupPayload() |
|
| 61 | } |
||
| 62 |