| 1 | <?php namespace RayEmitter\Example\BankAccount; |
||
| 5 | final class CreateAccount extends Command |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Constructor |
||
| 9 | * |
||
| 10 | * @param array $data Payload data. |
||
| 11 | */ |
||
| 12 | public function __construct(array $data) |
||
| 13 | { |
||
| 14 | $this->setupPayload(); |
||
| 15 | $this->payload->owner = $data['owner']; |
||
| 16 | $this->payload->deposit = $data['deposit']; |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Run |
||
| 21 | * |
||
| 22 | * Push the command into the Aggregate. |
||
| 23 | * @return void |
||
| 24 | */ |
||
| 25 | public function run() |
||
| 29 | } |
||
| 30 |