1 | <?php |
||
29 | class Command implements CommandInterface |
||
30 | { |
||
31 | /** |
||
32 | * Command string |
||
33 | * |
||
34 | * @var |
||
35 | */ |
||
36 | protected $cmd; |
||
37 | |||
38 | /** |
||
39 | * Array of options |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $options = array(); |
||
44 | |||
45 | /** |
||
46 | * Command constructor. |
||
47 | * |
||
48 | * @param $cmd |
||
49 | * @param array|null $options |
||
50 | * @throws \Exception |
||
51 | */ |
||
52 | 18 | public function __construct($cmd, array $options = null) |
|
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | 7 | public function toString() |
|
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | 9 | public function getCmd() |
|
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | 1 | public function getOptions() |
|
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | 8 | public function getOption($option, $default = null) |
|
97 | } |
||
98 |