Inheritance: extends Symfony\Component\Console\Command\Command
Example #1
0
 private function createCommand($expression, callable $callable)
 {
     $result = $this->expressionParser->parse($expression);
     $command = new Command($result['name']);
     $command->getDefinition()->addArguments($result['arguments']);
     $command->getDefinition()->addOptions($result['options']);
     $command->setCode($callable);
     return $command;
 }