In framework versions 3.2 or minor only HTTP requests were handled in STDOUT flow. This framework version adds support for handling console requests as well by integrating newly created Console MVC API and refactoring of Console API!
To add support for handling console requests in STDOUT flow, no fundamental change to existing code is required. The end goal was to:
If you're a 3.2 user already and desire to have console requests handling, please follow these steps to upgrade your project:
composer require lucinda/console-mvc
composer update<resolver format="console" content_type="text/plain" class="Lucinda\Project\ViewResolvers\Console"/>
$object = new Lucinda\STDOUT\FrontController("stdout.xml", new Lucinda\Project\Attributes());
...
$object->run();if (!empty($argv)) {
$object = new Lucinda\ConsoleSTDOUT\FrontController("stdout.xml", new Lucinda\Project\ConsoleAttributes());
...
$object->run();
} else {
$object = new Lucinda\STDOUT\FrontController("stdout.xml", new Lucinda\Project\Attributes());
...
$object->run();
}