Download the PHP package leaveyou/console without Composer
On this page you can find all versions of the php package leaveyou/console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download leaveyou/console
More information about leaveyou/console
Files in leaveyou/console
Download leaveyou/console
More information about leaveyou/console
Files in leaveyou/console
Vendor leaveyou
Package console
Short Description A set of console related components without the overhead of the illuminate framework
License MIT
Package console
Short Description A set of console related components without the overhead of the illuminate framework
License MIT
Please rate this library. Is it a good library?
Informations about the package console
Console
A set of console components for parsing command line arguments
Features:
- complex arguments recognition:
Parameters without value --verbose -v -vv -vvv Optional parameters with value --optional=1970 -o=1970 -o1970 -o"1970" Mandatory parameters with value --required=1970 -r=1970 -r1970 -r"1970" --required 1970 -r 1970 -r "1970"
- Automatically generated help pages
$ php test.php --help Asked for help page... -o, --optional Some example of an optional parameter -v, --verbose Whether verbose --account This parameter doesn't have a description --mandatory Mandatory parameter description. This should have one and only one value. --help Shows this help message
- Dependency injection / container-ready
- Improves upon native php function
getopt()
shortcomings:- Treats
--version
and-v
as the same parameter if defined as such. - Mandatory parameters are really MANDATORY
- Optional parameters cannot have empty value
- Allows to specify in advance if a parameter is a single string or a list of strings
- Default values for optional parameters
- @SOON: Support for trailing arbitrary data:
php x.php -abc [TRAILING] [DATA]
in PHP 5
- Treats
Usage
Then just run
Oups...
To do
- [x] Make a list
- [ ] Unit tests
- [ ] Replace native getopt() call to custom implementation
- [ ] Make repository more S.O.L.I.D.
- [ ] Better help page generation. Current one is crap.
- [ ] Find more things for this list
- [ ] Generate command synopsis and show optional parameters and usage
All versions of console with dependencies
PHP Build Version
Package Version
No informations.
The package leaveyou/console contains the following files
Loading the files please wait ....