1 Star 3 Fork 26

yg178/php-console

forked from inhere/php-console 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Command.php 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
inhere 提交于 2018-01-29 14:59 +08:00 . command help display modify
<?php
/**
* Created by PhpStorm.
* User: inhere
* Date: 2016/12/7
* Time: 13:23
*/
namespace Inhere\Console;
use Inhere\Console\Base\AbstractCommand;
use Inhere\Console\Base\CommandInterface;
/**
* Class Command
* @package Inhere\Console
*
* ```php
* In sub class:
*
* protected function execute($input, $output)
* {
* // some logic ...
* }
*
* ```
*/
abstract class Command extends AbstractCommand implements CommandInterface
{
/*
* do execute
* @param \Inhere\Console\IO\Input $input
* @param \Inhere\Console\IO\Output $output
* @return int
*/
// protected function execute($input, $output)
// {
// // something logic ...
// }
/*
* configure
*/
// protected function configure()
// {
// $this
// ->createDefinition()
// ->addArgument('test')
// ->addOption('test');
// }
/**
* @return bool
* @throws \ReflectionException
*/
protected function showHelp(): bool
{
if (true === parent::showHelp()) {
return true;
}
return $this->showHelpByMethodAnnotations('execute', null, static::aliases());
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hwsyy/php-console.git
git@gitee.com:hwsyy/php-console.git
hwsyy
php-console
php-console
master

搜索帮助