PHP Class HippoPHP\Hippo\CLI\ArgParser

Show file Open project: hippophp/hippo Class Usage Examples

Public Methods

Method Description
parse ( array $argv, ArgParserOptions $argParserOptions = null ) : ArgContainer

Private Methods

Method Description
__construct ( ArgParserOptions $argParserOptions = null )
extractArgValue ( string $arg, string $nextArg, boolean &$hasUsedNextArg ) : mixed
isArgument ( string $arg ) : boolean
isBool ( string $arg ) : boolean
isLongArgument ( string $arg ) : boolean
isShortArgument ( string $arg ) : boolean
normalizeArg ( string $arg ) : string Normalizes an argument key.
parseArgs ( array $argv ) : ArgContainer
processArg ( string $arg, string $nextArg ) : boolean
processStringValue ( string $normalizedArg, string $value ) : mixed
toBool ( string $arg ) : boolean

Method Details

parse() public static method

public static parse ( array $argv, ArgParserOptions $argParserOptions = null ) : ArgContainer
$argv array
$argParserOptions ArgParserOptions
return ArgContainer