Trait ArgScriptTrait
Additional utilities for handling arguments and inputs.
Methods summary
protected
array|Traversable
|
#
parseAsArray( mixed $var, string $delimiter = '[\s,]+' )
Resolve the given value as a collection of values.
Resolve the given value as a collection of values.
If the given value is a string, it will be split.
Parameters
- $var
- An argument to split.
- $delimiter
- The boundary string.
Returns
array|Traversable
Throws
InvalidArgumentException If the value cannot be parsed into an array.
|
protected
Charcoal\App\Script\ArgScriptTrait
|
#
parseArguments( )
Parse command line arguments into script properties.
Parse command line arguments into script properties.
Returns
Throws
RuntimeException If a checkbox/radio argument has no options.
|