2020-08-31 01:27:08 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public $command = '';
|
|
|
|
|
public $description = '';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* 返回执行的命令名称
|
|
|
|
|
*/
|
|
|
|
|
public function getName()
|
|
|
|
|
{
|
|
|
|
|
return $this->command;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*
|
|
|
|
|
* 返回命令描述
|
|
|
|
|
*/
|
|
|
|
|
public function getDescription()
|
|
|
|
|
{
|
|
|
|
|
return $this->description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|