Lines Matching refs:opt
251 $opt = array_shift($arg);
254 if (!isset($this->setup[$this->command]['opts'][$opt])) {
255 throw new Exception("No such option '$opt'", Exception::E_UNKNOWN_OPT);
259 if ($this->setup[$this->command]['opts'][$opt]['needsarg']) {
264 throw new Exception("Option $opt requires an argument",
267 $this->options[$opt] = $val;
269 $this->options[$opt] = true;
276 $opt = substr($arg, 1);
277 if (!isset($this->setup[$this->command]['short'][$opt])) {
280 $opt = $this->setup[$this->command]['short'][$opt]; // store it under long name
284 if ($this->setup[$this->command]['opts'][$opt]['needsarg']) {
293 $this->options[$opt] = $val;
295 $this->options[$opt] = true;
421 foreach ($this->setup[$command]['opts'] as $long => $opt) {
424 if ($opt['short']) {
425 $name .= '-' . $opt['short'];
426 if ($opt['needsarg']) {
427 $name .= ' <' . $opt['needsarg'] . '>';
432 if ($opt['needsarg']) {
433 $name .= ' <' . $opt['needsarg'] . '>';
438 array('', $name, $opt['help']),