PHP Micro framework for command line application inspired by Slim Framework
- Container support
- Easy yet powerful configuration
- Command dispatch
After composer install, create an hello.php file with the following contents:
<?php
require 'vendor/autoload.php';
$app = new Clim\App();
$app->opt('-u|--upper');
$app->arg('name')->default('unknown');
$app->task(function ($opts, $args) {
$name = $args['name'];
if ($opts['u']) $name = strtoupper($name);
echo "Welcome, {$name}\n";
});
$app->run();Then from the shell:
$ php hello.php Nocchi
Welcome, Nocchi
$ php hello.php -u Kashiyuka
Welcome, KASHIYUKAFor more information on how to configure your clie application, see the Documentation.
To execute the test suite, you'll need codeception.
$ vendor/bin/codecept run unitSpecial thanks to Slim Framework for the archtecture and the api design.
The Clim Framework is licensed under the MIT license. See License File for more information.