PHP Class GetOptionKit\OptionParser

Afficher le fichier Open project: c9s/getoptionkit Class Usage Examples

Méthodes publiques

Свойство Type Description
$longOptions
$shortOptions
$specs

Méthodes publiques

Méthode Description
__construct ( OptionCollection $specs )
parse ( array $argv ) : OptionResult | Option[]
setSpecs ( OptionCollection $specs )

Méthodes protégées

Méthode Description
consumeOptionToken ( Option $spec, $arg, $next, &$success = false ) : boolean consume option value from current argument or from the next argument
preprocessingArguments ( array $argv ) preprocess the argv array
pushOptionValue ( Option $spec, $arg, $next ) * push value to multipl value option

Method Details

__construct() public méthode

public __construct ( OptionCollection $specs )
$specs OptionCollection

consumeOptionToken() protected méthode

consume option value from current argument or from the next argument
protected consumeOptionToken ( Option $spec, $arg, $next, &$success = false ) : boolean
$spec Option
Résultat boolean next token consumed?

parse() public méthode

public parse ( array $argv ) : OptionResult | Option[]
$argv array
Résultat OptionResult | Option[]

preprocessingArguments() protected méthode

- split option and option value - separate arguments after "--"
protected preprocessingArguments ( array $argv )
$argv array

pushOptionValue() protected méthode

* push value to multipl value option
protected pushOptionValue ( Option $spec, $arg, $next )
$spec Option

setSpecs() public méthode

public setSpecs ( OptionCollection $specs )
$specs OptionCollection

Property Details

$longOptions public_oe property

public $longOptions

$shortOptions public_oe property

public $shortOptions

$specs public_oe property

public $specs