joomla/joomla-framework — pull request #275 by asika32764 (2013-11-10 07:50:17+00:00)
Title: A Joomla Console Package

Hi,

As the mailing list post: https://groups.google.com/forum/#!topic/joomla-dev-framework/YBrwXf5WONw

I create a Joomla! Console package.

Though we have a Cli Application, but we don't have an ease-of-use Command interface to dispatch arguments and options.

This Console package is inspired by Symfony Console and some lightweight php cli libraries. But this package is different from Symfony Console.

I use a nested structure to call command and sub command. We can create a console application with many level of commands, every command has its own sub commands(arguments) and options.

The option has global and private type. Global option like `--help`, `--quiet`, `--verbose` and `--no-ansi` will send to all sub commands.

Command is not dependency on cli application, we can use command with console or just use simply command object only. But the Console will provides some useful functions.

---------

This is the command calling flow:

``` bash
$ php cli/app.php command1 command2 command3 -a -b -cd --help
```

``` text
command1
->configure
->execute

commend2
->configure
->execute

commend3
->configure
->execute

return

return

return
```