PHP Class GetOptionKit\Argument

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

Méthodes publiques

Свойство Type Description
$arg

Méthodes publiques

Méthode Description
__construct ( $arg )
__toString ( )
anyOfOptions ( OptionCollection $options ) Check if an option is one of the option in the collection.
containsOptionValue ( )
extractExtraFlagOptions ( )
getOptionName ( ) : string Parse option and return the name after dash. e.g., '--foo' returns 'foo' '-f' returns 'f'.
getOptionValue ( )
isEmpty ( )
isLongOption ( )
isOption ( ) Check current argument is an option by the preceding dash.
isShortOption ( )
splitAsOption ( )
withExtraFlagOptions ( ) Check combined short flags for "-abc" or "-vvv".

Method Details

__construct() public méthode

public __construct ( $arg )

__toString() public méthode

public __toString ( )

anyOfOptions() public méthode

Check if an option is one of the option in the collection.
public anyOfOptions ( OptionCollection $options )
$options OptionCollection

containsOptionValue() public méthode

public containsOptionValue ( )

extractExtraFlagOptions() public méthode

getOptionName() public méthode

Parse option and return the name after dash. e.g., '--foo' returns 'foo' '-f' returns 'f'.
public getOptionName ( ) : string
Résultat string

getOptionValue() public méthode

public getOptionValue ( )

isEmpty() public méthode

public isEmpty ( )

isLongOption() public méthode

public isLongOption ( )

isOption() public méthode

note this method does not work for string with negative value. -a --foo
public isOption ( )

isShortOption() public méthode

public isShortOption ( )

splitAsOption() public méthode

public splitAsOption ( )

withExtraFlagOptions() public méthode

like: -abc

Property Details

$arg public_oe property

public $arg