1 | <?php |
||
15 | class MemoryUniqueCommandQueue implements CommandQueue |
||
16 | { |
||
17 | /** |
||
18 | * @var Command[] |
||
19 | */ |
||
20 | private $commands = []; |
||
21 | |||
22 | /** |
||
23 | * Push command to queue. |
||
24 | * |
||
25 | * @param Command $command |
||
26 | * |
||
27 | * @return bool |
||
28 | */ |
||
29 | 1 | public function push(Command $command) |
|
42 | |||
43 | /** |
||
44 | * Pop command from queue. Return NULL if queue is empty. |
||
45 | * |
||
46 | * @return Command|null |
||
47 | */ |
||
48 | 1 | public function pull() |
|
52 | } |
||
53 |