1 | <?php |
||
8 | class OptionParser extends Parser |
||
9 | { |
||
10 | /** |
||
11 | * Option name. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $name = ''; |
||
16 | |||
17 | /** |
||
18 | * Option shortcut. |
||
19 | * |
||
20 | * @var null|string |
||
21 | */ |
||
22 | protected $shortcut = null; |
||
23 | |||
24 | /** |
||
25 | * Array of option modes to apply. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $modeArray = []; |
||
30 | |||
31 | /** |
||
32 | * Option description. |
||
33 | * |
||
34 | * @var null|string |
||
35 | */ |
||
36 | protected $description = null; |
||
37 | |||
38 | /** |
||
39 | * Default option value. |
||
40 | * |
||
41 | * @var null|string |
||
42 | */ |
||
43 | protected $default = null; |
||
44 | |||
45 | /** |
||
46 | * Parse the given option string. |
||
47 | * |
||
48 | * @param string $option |
||
49 | */ |
||
50 | public function handle($option) |
||
74 | |||
75 | /** |
||
76 | * Parse option value and value default. |
||
77 | * |
||
78 | * @param string $option |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | protected function parseValue($option) |
||
96 | } |
||
97 |