예제 #1
0
 private function getDependencyList(Task $task)
 {
     if (isset($this->marked[$task->getName()])) {
         return array();
     }
     $this->marked[$task->getName()] = true;
     $path = array();
     $deps = $this->asTasks($task->getDependencies());
     foreach ($deps as $dep) {
         $path = array_merge($path, $this->getDependencyList($dep));
     }
     $path[] = $task->getName();
     return $path;
 }
예제 #2
0
 /**
  * Register a task for this executor.
  */
 public function registerTask(Task $task)
 {
     $this->tasks[$task->getName()] = $task;
 }