Command line ADR implementation
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
LICENSE.md
README.md
build.xml
composer.json
composer.lock
phpcs.xml
phpunit.xml.dist

README.md

Cadre.CliAdr

This is a proof of concept command line Action-Domain-Responder (ADR) implementation.

It's heavily inspired by Radar.

Example

use Aura\Di\ContainerBuilder;
use Aura\Cli\CliFactory;

require __DIR__ . '/../vendor/autoload.php';

$di = (new ContainerBuilder())
    ->newConfiguredInstance([
        'Cadre\CliAdr\Config',
    ]);

$adr = $di->get('cadre:cliadr/adr');

$factory = new CliFactory();
$context = $factory->newContext($GLOBALS);
$stdio = $factory->newStdio();

$adr->route('test', function ($params) {
    return 'This is a test.';
});

exit($adr->run($context, $stdio));