同步更新

This commit is contained in:
2026-01-13 17:27:32 +08:00
parent 45785dd33f
commit 5d6e2fc5e0
38 changed files with 1211 additions and 305 deletions

View File

@@ -0,0 +1,32 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2025 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qq.com>
// +----------------------------------------------------------------------
namespace think\console\command;
use think\console\Command;
use think\console\Input;
/**
* @mixin Command
*/
trait CommandCallable
{
/**
* @param class-string<Command> $class
*/
private function callCommand(string $class): Command
{
return tap(app($class, newInstance: true), function ($command) {
$command->setApp($this->app);
$command->run(new Input([]), clone $this->output);
});
}
}