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!'); }
/** * 获取要执行的command名称 * @return string */ function getCommandName() { return $this->argv->getFirstArgument(); }
/** * (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)); }