/** * doExecute * * @throws \InvalidArgumentException * @return mixed */ protected function doExecute() { if (!$this->getArgument(0)) { throw new \InvalidArgumentException('Please give me template name.'); } $this->io->setArgument(1, $this->getArgument(0)); $this->io->setArgument(0, 'template'); $io = new IO($this); $controller = new GeneratorController($io); $controller->setTask('generate')->execute(); }
/** * Execute this command. * * @return int|void */ protected function doExecute() { $io = new IO($this); $controller = new GeneratorController($io); $controller->setTask('convert')->execute(); }