Repository navigation
Releases: jdwx/args
Release list
v2.0.0
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
Found an edge case with integer values being coerced to true while updating the examples.
Examples have been updated to show how the Option and Options classes work. The examples in the README.md are now also provided as example.php in the examples directory (mainly to make sure they work).
Because of the significant additions to option handling, we're bumping the minor version.
v1.1.17
Added separate classes to streamline processing two common types of optional command line flags, with or without associated values.
The Option class defines a single option and can be set from an Arguments object to handle and remove any matching references to that option. This can be used directly when there are just one or two simple options to process.
The Options class collects several Option objects together and provides an ArrayAccess interface to IParameter instances. This should be used when there are many options, the same set of options used in multiple places, or if you want to easily get a provided option value as (e.g.) an integer.
v1.1.16
Revert a change that caused breakage downstream.
Since we can't guarantee constructor arguments in subclasses, change Arguments::fromString() and Arguments::copy() to operate on self:: rather than static:: . This will necessitate overloading them in subclasses.