1 | <?php |
||
8 | class SignatureParser |
||
9 | { |
||
10 | /** |
||
11 | * The command to build. |
||
12 | * |
||
13 | * @var Command |
||
14 | */ |
||
15 | protected $command; |
||
16 | |||
17 | /** |
||
18 | * Construct. |
||
19 | * |
||
20 | * @param Command $command |
||
21 | */ |
||
22 | public function __construct(Command $command) |
||
26 | |||
27 | /** |
||
28 | * Parse the command signature. |
||
29 | * |
||
30 | * @param string $signature |
||
31 | */ |
||
32 | public function parse($signature) |
||
48 | |||
49 | /** |
||
50 | * Set the command name. |
||
51 | * |
||
52 | * @param string $signature |
||
53 | */ |
||
54 | protected function setName($signature) |
||
58 | |||
59 | /** |
||
60 | * Extract arguments and options from signature. |
||
61 | * |
||
62 | * @param string $signature |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | protected function extractArgumentsOptions($signature) |
||
74 | } |
||
75 |