Lines Matching defs:option
25 /** @var array passed non-option arguments */
152 * Register an option for option parsing and help generation
154 * @param string $long multi character option (specified with --)
155 * @param string $help help text for this option
156 * @param string|null $short one character option (specified with -)
157 * @param bool|string $needsarg does this option require an argument? give it a name here
158 * @param string $command what command does this option apply to
242 // first non-option
248 // long option
255 throw new Exception("No such option '$opt'", Exception::E_UNKNOWN_OPT);
275 // short option
278 throw new Exception("No such option $arg", Exception::E_UNKNOWN_OPT);
311 * Get the value of the given option
313 * Please note that all options are accessed by their long option names regardless of how they were
318 * @param mixed $option
319 * @param bool|string $default what to return if the option was not set
322 public function getOpt($option = null, $default = false)
324 if ($option === null) {
328 if (isset($this->options[$option])) {
329 return $this->options[$option];
414 // option description