1 | <?php |
||
9 | class ParsedCommand |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * The command |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | private $command; |
||
18 | |||
19 | /** |
||
20 | * List of arguments |
||
21 | * |
||
22 | * @var string[] |
||
23 | */ |
||
24 | private $args; |
||
25 | |||
26 | /** |
||
27 | * Create a new parsed command instance |
||
28 | * |
||
29 | * @param string $command |
||
30 | * The command |
||
31 | * @param array $args |
||
32 | * Optional arguments |
||
33 | */ |
||
34 | 4 | public function __construct(string $command, array $args = array()) |
|
39 | |||
40 | /** |
||
41 | * Retrieve the parsed command |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | 4 | public function getCommand(): string |
|
49 | |||
50 | /** |
||
51 | * Retrieve list of arguments |
||
52 | * |
||
53 | * @return string[] |
||
54 | */ |
||
55 | 3 | public function getArguments(): array |
|
59 | } |
||
60 |