sbooker/console

Console command superclass

1.1.0 2021-12-05 12:22 UTC

This package is auto-updated.

Last update: 2024-11-05 19:11:10 UTC


README

Catch all exceptions and write message, trace (in verbose mode) to console output.

Returns code depends of executing result. Zero on success. Exception code or one otherwise.

Version Software License Downloads

Installation

composer require sbooker/console

Usage

use Sbooker\Console\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ConcreteCommand extends Command
{
    // Define command. See [Symfony Console Component](https://symfony.com/doc/current/components/console.html) 

    protected function doExecute(InputInterface $input, OutputInterface $output) : void {
        // .... do something successful ....
    }
}

License

See LICENSE file.