public function registerTask($name, Task $task) { $task->setLogger($this); $this->tasks[$name] = $task; }