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; }
/** * Register a task for this executor. */ public function registerTask(Task $task) { $this->tasks[$task->getName()] = $task; }