X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fpharext%2FCli%2FArgs.php;h=07fa892fd68196fe0bccf9ea29aa8261230dbf0a;hb=e458434f1a5539f1905e61835bed0123f1635067;hp=38cfaca80e862546f06f989e13d7c9844c6f46cb;hpb=e990b6dabecbdaf98b8d8b2173b0d697f9b2b754;p=pharext%2Fpharext diff --git a/src/pharext/Cli/Args.php b/src/pharext/Cli/Args.php index 38cfaca..07fa892 100644 --- a/src/pharext/Cli/Args.php +++ b/src/pharext/Cli/Args.php @@ -176,6 +176,16 @@ class Args implements \ArrayAccess } } + + public function toArray() { + $args = []; + foreach ($this->spec as $spec) { + $opt = $this->opt($spec[1]); + $args[$opt] = $this[$opt]; + } + return $args; + } + /** * Retreive the default argument of an option * @param string $o