1 | <?php |
||
9 | class SignatureParser |
||
10 | { |
||
11 | /** |
||
12 | * The command to build. |
||
13 | * |
||
14 | * @var Command |
||
15 | */ |
||
16 | protected $command; |
||
17 | |||
18 | /** |
||
19 | * Construct. |
||
20 | * |
||
21 | * @param Command $command |
||
22 | */ |
||
23 | public function __construct(Command $command) |
||
27 | |||
28 | /** |
||
29 | * Parse the command signature. |
||
30 | * |
||
31 | * @param string $signature |
||
32 | */ |
||
33 | public function parse($signature) |
||
51 | |||
52 | /** |
||
53 | * Set the command name. |
||
54 | * |
||
55 | * @param string $signature |
||
56 | */ |
||
57 | protected function setName($signature) |
||
61 | |||
62 | /** |
||
63 | * Extract arguments and options from signature. |
||
64 | * |
||
65 | * @param string $signature |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | protected function extractArgumentsOptions($signature) |
||
77 | } |
||
78 |