function execute(Io $io, Argv $argv) { $type = $argv->getOption('type'); $paths = $this->getClearPaths(); if (!empty($type)) { $paths = array_intersect_key($paths, array_flip(explode(',', $type))); } $this->clearPaths($paths); $io->writeln('Clear ok!'); }
/** * 渲染异常 * * @param \Exception $e */ protected function renderException(\Exception $e) { $messages = [get_class($e), '<error>' . $e->getMessage() . '</error>']; $this->io->writeln(PHP_EOL . implode(PHP_EOL, $messages)); }