parsing - Is there a complete command-line parser for PHP? -
i looking command parsing library similar thor, php.
more specifically, can...
- handle subcommands input, e.g.
git remote add <url>
- associate options values, e.g.
my-command --some-option='value'
creates key-value pairarray( 'some-option' => 'value' )
- generates usage/help info configuration passed it
- processes -short , --long options
- the library being maintained
- has in php (otherwise, i'd use thor)
none of solutions have looked @ far has been satisfactory.
the closest thing hitting mark pear's console_getargs, though not being maintained.
the pear
command uses console_getopt, though perform significant amount of manual processing achieve features in first 3 requirements.
php's getopt()
cannot handle subcommands, , there not seem other built-in methods approximate functionality.
is there php library fits these criteria may have missed?
Comments
Post a Comment