add plugin command bootstrappers

This commit is contained in:
crazywhalecc
2023-03-29 21:31:53 +08:00
committed by Jerry
parent eeb3481c5a
commit 5ac92ae210
4 changed files with 25 additions and 11 deletions

View File

@@ -13,16 +13,15 @@ use ZM\Plugin\PluginManager;
abstract class PluginCommand extends Command
{
protected array $bootstrappers = [
BootStrap\RegisterLogger::class,
Bootstrap\SetInternalTimezone::class,
Bootstrap\LoadConfiguration::class,
Bootstrap\LoadPlugins::class,
];
/** @var null|string 动态插件和 Phar 插件的加载目录 */
protected ?string $plugin_dir = null;
public function __construct(string $name = null)
{
parent::__construct($name);
$this->emitBootstrap(Bootstrap\LoadPlugins::class);
}
/**
* 插件名称合规验证器
*/