Overview

Retrieves and validates command-line options and parameter values.

Package

This class is part of the Solar_Getopt package.

Inheritance:

Configuration Keys

  • filter_class: The data-filter class to use when validating and sanitizing parameter values.

  • strict: In strict mode, throw an exception when an unknown option is passed into getopt.

Constants

None.

Public Properties

These are all the public properties in the Solar_Getopt class.

You can also view the list of all public, protected, and private properties.

$options

The array of acceptable options.

Public Methods

These are all the public methods in the Solar_Getopt class.

You can also view the list of all public, protected, and private methods.

__construct()

Constructor.

__destruct()

Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().

dump()

Convenience method for getting a dump the whole object, or one of its properties, or an external variable.

getInvalid()

Returns a list of invalid options and their error messages (if any).

locale()

Looks up class-specific locale strings based on a key.

populate()

Populates the options with values from $argv.

setOption()

Sets one option for recognition.

setOptions()

Sets multiple acceptable options.

validate()

Applies validation and sanitizing filters to the option values.

values()

Returns the populated option values.



Local