Exemplo 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!');
 }
Exemplo n.º 2
0
 /**
  * 获取要执行的command名称
  * @return string
  */
 function getCommandName()
 {
     return $this->argv->getFirstArgument();
 }
Exemplo n.º 3
0
 /**
  * (non-PHPdoc)
  * @see \Slince\Console\Command::execute()
  */
 function execute(Io $io, Argv $argv)
 {
     $commandName = $argv->getArgument('command_name');
     $command = $this->console->find($commandName);
     $io->write($this->getCommandHelp($command));
 }