예제 #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!');
 }
예제 #2
0
파일: Console.php 프로젝트: slince/console
 /**
  * 获取要执行的command名称
  * @return string
  */
 function getCommandName()
 {
     return $this->argv->getFirstArgument();
 }
예제 #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));
 }