Adds Optional Arguments via Constructor to Assist DI
Adds a constructor with optional $args and $skipFirstArgument to make working with DI easier. These values when provided will now be used as the defaults calling parse unless arguments are passed to parse.
No changes to existing code should be necessary.
function __construct([ $args = null [, $skipFirstArgument = true]])VERY MINOR BC CHANGES
- Not passing a value now defaults to
$_SERVER['argv']rather than$GLOBALS['argv'] $_SERVER['argv']is now evaluated at construct time rather than parse time.