Files
kiri-core/Gii/Command.php
T

39 lines
598 B
PHP
Raw Normal View History

2020-09-08 15:59:15 +08:00
<?php
2020-10-30 01:07:28 +08:00
declare(strict_types=1);
2020-09-08 15:59:15 +08:00
namespace Gii;
use Exception;
use Snowflake\Abstracts\Input;
use Snowflake\Exception\ConfigException;
use Snowflake\Snowflake;
/**
* Class Command
* @package HttpServer
*/
class Command extends \Console\Command
{
2020-10-30 01:07:28 +08:00
public string $command = 'sw:gii';
2020-09-08 15:59:15 +08:00
2020-10-30 01:07:28 +08:00
public string $description = 'server start|stop|reload|restart';
2020-09-08 15:59:15 +08:00
/**
* @param Input $dtl
* @return array
* @throws Exception
*/
2020-12-17 14:09:14 +08:00
public function onHandler(Input $dtl): array
2020-09-08 15:59:15 +08:00
{
/** @var Gii $gii */
$gii = Snowflake::app()->get('gii');
2021-01-19 19:01:50 +08:00
return $gii->run($dtl->get('databases'), $dtl);
2020-09-08 15:59:15 +08:00
}
}