@@ 53-62 (lines=10) @@ | ||
50 | * |
|
51 | * @return $this |
|
52 | */ |
|
53 | protected function setDefault() |
|
54 | { |
|
55 | if (strpos($this->input, '=')) { |
|
56 | list($this->input, $this->default) = explode('=', $this->input); |
|
57 | ||
58 | $this->modeArray[] = 'OPTIONAL'; |
|
59 | } |
|
60 | ||
61 | return $this; |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * Set required mode if optional not already set. |
@@ 78-85 (lines=8) @@ | ||
75 | * |
|
76 | * @return $this |
|
77 | */ |
|
78 | protected function setShortcut() |
|
79 | { |
|
80 | if (strpos($this->input, '|') !== false) { |
|
81 | list($this->shortcut, $this->input) = explode('|', $this->input); |
|
82 | } |
|
83 | ||
84 | return $this; |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * Get the option attributes. |
@@ 81-90 (lines=10) @@ | ||
78 | * |
|
79 | * @return $this |
|
80 | */ |
|
81 | protected function setArray($constant) |
|
82 | { |
|
83 | if (strpos($this->input, '*') !== false) { |
|
84 | $this->modeArray[] = $constant; |
|
85 | ||
86 | $this->input = str_replace('*', '', $this->input); |
|
87 | } |
|
88 | ||
89 | return $this; |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * Parse an argument/option description. |