2020-08-31 01:27:08 +08:00
|
|
|
<?php
|
2020-10-29 18:17:25 +08:00
|
|
|
declare(strict_types=1);
|
2020-08-31 01:27:08 +08:00
|
|
|
|
2020-09-03 00:15:57 +08:00
|
|
|
namespace Console;
|
2020-08-31 01:27:08 +08:00
|
|
|
|
|
|
|
|
use Snowflake\Abstracts\BaseObject;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Command
|
2020-09-03 00:15:57 +08:00
|
|
|
* @package Console
|
2020-08-31 01:27:08 +08:00
|
|
|
*/
|
|
|
|
|
abstract class Command extends BaseObject implements CommandInterface
|
|
|
|
|
{
|
|
|
|
|
|
2020-10-29 11:19:02 +08:00
|
|
|
public string $command = '';
|
|
|
|
|
public string $description = '';
|
2020-08-31 01:27:08 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* 返回执行的命令名称
|
|
|
|
|
*/
|
|
|
|
|
public function getName()
|
|
|
|
|
{
|
|
|
|
|
return $this->command;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*
|
|
|
|
|
* 返回命令描述
|
|
|
|
|
*/
|
|
|
|
|
public function getDescription()
|
|
|
|
|
{
|
|
|
|
|
return $this->description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|