| 1 | <?php |
||
| 15 | class MemoryPullCommandQueue implements PullCommandQueue |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var Command[] |
||
| 19 | */ |
||
| 20 | private $commands = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Publish command to queue. |
||
| 24 | * |
||
| 25 | * @param Command $command |
||
| 26 | * |
||
| 27 | * @return bool |
||
| 28 | */ |
||
| 29 | 1 | public function publish(Command $command) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Pop command from queue. Return NULL if queue is empty. |
||
| 38 | * |
||
| 39 | * @return Command|null |
||
| 40 | */ |
||
| 41 | 1 | public function pull() |
|
| 45 | } |
||
| 46 |