execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Esempio 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);
     }
 }
Esempio 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']);
     }
 }
Esempio 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]);
     }
 }