Cilex/Cilex — pull request #58 by henrikbjorn (2014-10-10 08:31:51+00:00)
Title: Add easy way to use simple closures as commands

This fixed #27

I know this is a BC but since it targets 2.0 i think it is okay.

The reason for renaming command to add is that it adds the command to the application, which is the same terminology used by a normal Console Application. Also when using closures the name `command` feels more natural.

here is an example, the syntax should be equal to the one used in Silex with its `get`, `post` etc functions.

``` php
command('my-command-name', function ($input, $output) {
// do something
});

$command = $cilex->command('my-command-name', function ($input, $output) {
// do something
});

$command->addOption(); // etc.
```