Inheritance: extends Symfony\Component\Console\Command\Command
Ejemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $state = parent::execute($input, $output);
     $image = $input->getOption("image");
     if ($image) {
         $parts = explode('.', $image);
         (new Printer\GraphViz())->printCfg($state->blocks)->export(end($parts), $image);
     } else {
         echo (new Printer\Text())->printCfg($state->blocks);
     }
 }
Ejemplo n.º 2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $components = parent::execute($input, $output);
     $image = $input->getOption("image");
     if ($image) {
         $parts = explode('.', $image);
         (new Printer\GraphViz())->printVars($components['cfg'])->export(end($parts), $image);
     } else {
         echo (new Printer\Text())->printVars($components['cfg']);
     }
 }
Ejemplo n.º 3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $components = parent::execute($input, $output);
     $this->loadRules();
     $errors = [];
     foreach ($this->rules as $rule) {
         echo "Executing rule: " . $rule->getName() . "\n";
         $errors = array_merge($errors, $rule->execute($components));
     }
     foreach ($errors as $error) {
         $this->emitError($error[0], $error[1]);
     }
 }