Beispiel #1
0
 protected function executeCommand($name, array $arguments, Console $console)
 {
     $fingerprint = $this->fingerprint($name, $arguments);
     if (array_key_exists($fingerprint, $this->executed)) {
         return;
     }
     if (array_key_exists($fingerprint, $this->queue)) {
         $circle = '[' . implode('] -> [', array_merge(array_values($this->queue), array($name))) . ']';
         throw new \Exception('Circular dependency detected: ' . $circle);
     }
     $this->queue[$fingerprint] = $name;
     foreach ($this->dependencies[$name] as $dependency) {
         $this->executeCommand($dependency['command'], $dependency['arguments'], $console);
     }
     if ($this->verbose && count($this->queue) + count($this->executed) > 1) {
         $console->out->writeLine('');
         $console->out->writeLine('>>>>>>>>> ' . $name);
         $console->out->writeLine('');
     }
     parent::executeCommand($name, $arguments, $console);
     array_pop($this->queue);
     $this->executed[$fingerprint] = true;
 }