think\console\Command::__construct PHP Method

__construct() public method

构造方法
public __construct ( string | null $name = null )
$name string | null 命令名称,如果没有设置则比如在 configure() 里设置
    public function __construct($name = null)
    {
        $this->definition = new Definition();
        if (null !== $name) {
            $this->setName($name);
        }
        $this->configure();
        if (!$this->name) {
            throw new \LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this)));
        }
    }