/** * Get instance of the Shell. * @return \Psy\Shell */ public function getShell() { if (!$this->shell) { $config = new Configuration(); $config->getPresenter()->addCasters($this->getCasters()); $this->shell = new Shell($config); $this->shell->addCommands($this->getCommands()); } return $this->shell; }
/** * @return void */ public function fire() { $this->getApplication()->setCatchExceptions(false); $config = new Configuration(); $config->getPresenter()->addCasters($this->getCasters()); $shell = new Shell($config); $shell->addCommands($this->getCommands()); $shell->setIncludes($this->argument('include')); $shell->run(); }