| 1 | <?php |
||
| 9 | trait ExecutesCommands |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Executes a command in the command bus. |
||
| 13 | * |
||
| 14 | * @param object $command |
||
| 15 | * @return mixed |
||
| 16 | */ |
||
| 17 | protected function execute($command) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Marshal a command from the given object and execute it in the command bus. |
||
| 24 | * |
||
| 25 | * @param string $command |
||
| 26 | * @param ArrayAccess $source |
||
| 27 | * @param array $extras |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | protected function executeFrom($command, ArrayAccess $source, array $extras = []) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Marshal a command from the given array and execute it in the command bus. |
||
| 37 | * |
||
| 38 | * @param string $command |
||
| 39 | * @param array $array |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | protected function executeFromArray($command, array $array) |
||
| 46 | } |
||
| 47 |