resourceManager = new ResourceManager(); $this->pluginManager = new PluginManager(); $this->environment = Environment::createFromDirectory(null, true); $this->environment->loadEnvironment(); $this->add(new Commands\RunCommand()); $this->add(new Commands\ResourcesCommand()); $this->add(new Commands\ReplCommand()); $this->add(new Commands\InitCommand()); $this->get("list")->setHidden(true); $this->get("completion")->setHidden(true); $this->get("help")->setHidden(true); if (getenv("SPARK_PLUGINS")) { $this->add(new Commands\PluginsCommand()); } } public function getPluginManager(): PluginManager { return $this->pluginManager; } public function getEnvironment(): Environment { // if (empty($this->environment)) { // $this->environment = Environment::createFromDirectory(); // $this->environment->setLogger($this->logger); // } return $this->environment; } public function getResourceManager(): ResourceManager { return $this->resourceManager; } public function getLogger(): LoggerInterface { return $this->logger; } public function doRun(InputInterface $input, OutputInterface $output) { $this->logger = new ConsoleLogger($output); parent::doRun($input, $output); } }