Lines Matching defs:options
8 * Parses command line options passed to the CLI script. Allows CLI scripts to easily register all accepted options and
16 /** @var array keeps the list of options to parse */
19 /** @var array store parsed options */
20 protected $options = array();
63 $this->options = array();
131 * Sub commands have their own options and use their own function (not main()).
175 throw new Exception("Short options should be exactly one ASCII character");
209 * Parses the given arguments for known options and command
212 * array is stripped from any options and possible command. All found otions can be accessed via the
215 * Note that command options will overwrite any global options with the same name
229 // The special element '--' means explicit end of options. Treat the rest of the arguments as non-options
267 $this->options[$opt] = $val;
269 $this->options[$opt] = true;
293 $this->options[$opt] = $val;
295 $this->options[$opt] = true;
313 * Please note that all options are accessed by their long option names regardless of how they were
325 return $this->options;
328 if (isset($this->options[$option])) {
329 return $this->options[$option];
347 * This will not contain any recognized options or the script name itself
357 * Builds a help screen from the available options. You may want to call it from -h or on error