1 Star 3 Fork 26

yg178/php-console

forked from inhere/php-console 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CorCommand.php 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
inhere 提交于 2018-01-26 19:40 +08:00 . update something for swoole wrapper
<?php
/**
* Created by PhpStorm.
* User: inhere
* Date: 2018-01-26
* Time: 17:47
*/
namespace Inhere\Console\Examples\Commands;
use Inhere\Console\Command;
use Inhere\Console\IO\Input;
use Inhere\Console\IO\Output;
use Inhere\Console\Utils\Helper;
/**
* Class CorCommand
* @package Inhere\Console\Examples\Commands
*/
class CorCommand extends Command
{
protected static $name = 'cor';
protected static $description = 'a coroutine test command';
protected static $coroutine = true;
/**
* @return array
*/
public static function aliases(): array
{
return ['coro'];
}
/**
* do execute
* @param Input $input
* @param Output $output
*/
protected function execute($input, $output)
{
$output->aList([
'support coroutine?' => Helper::isSupportCoroutine() ? 'Y' : 'N',
'open coroutine running?' => self::isCoroutine() ? 'Y' : 'N',
'running in coroutine?' => Helper::inCoroutine() ? 'Y' : 'N',
], 'some information');
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hwsyy/php-console.git
git@gitee.com:hwsyy/php-console.git
hwsyy
php-console
php-console
master

搜索帮助