pablosanches / goliath
A simple framework to facilitate the development of CLI applications based on PHP command.
1.0.0
2017-08-09 19:49 UTC
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: 4.2.*
This package is auto-updated.
Last update: 2024-12-26 07:08:44 UTC
README
A simple framework to facilitate the development of CLI applications based on PHP command.
Features
- Routing of command line arguments
- Short and long arguments
- Automagic
--help
creation - Configuration
Requirements
PHP >=5.6
Example
use Goliath\Cli; $app = new Goliath\Cli(); $app = new \Goliath\Cli(array( 'debug' => true, 'log.destination' => \Goliath\Logger::LOG_STDERR, 'log.dir' => __DIR__ )); $app->command('hello-world:', function($name) { echo "Hello $name\n"; }) ->setHelp('Hello world example');
Installation
You only need to include the depency in the composer.
"require": { "pablosanches/goliath": "1.0.*" }
And run the composer
$ composer install