sbooker/console

控制台命令超类

1.1.0 2021-12-05 12:22 UTC

This package is auto-updated.

Last update: 2024-09-05 18:46:33 UTC


README

捕获所有异常并写入消息,在详细模式下将跟踪写入控制台输出。

返回代码取决于执行结果。成功时为零。异常代码或否则为1。

Version Software License Downloads

安装

composer require sbooker/console

使用

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.cn/doc/current/components/console.html) 

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

许可证

LICENSE 文件。