Ejemplo n.º 1
0
 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!');
 }
Ejemplo n.º 2
0
 /**
  * 渲染异常
  * 
  * @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));
 }