1 | <?php |
||
19 | class CommandStack |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * |
||
24 | * @var CommandInterface[] |
||
25 | */ |
||
26 | private $commands = array(); |
||
27 | |||
28 | /** |
||
29 | * |
||
30 | * @param CommandInterface $command |
||
31 | */ |
||
32 | public function push(CommandInterface $command) |
||
36 | |||
37 | /** |
||
38 | * |
||
39 | * @return CommandInterface |
||
40 | */ |
||
41 | public function pop() |
||
49 | |||
50 | /** |
||
51 | * |
||
52 | * @return CommandInterface |
||
53 | */ |
||
54 | public function getCurrentCommand() |
||
58 | |||
59 | /** |
||
60 | * |
||
61 | * @return CommandInterface |
||
62 | */ |
||
63 | public function getMasterCommand() |
||
71 | |||
72 | /** |
||
73 | * |
||
74 | * @return CommandInterface |
||
75 | */ |
||
76 | public function getParentCommand() |
||
86 | } |
||
87 |