app = $app; $this->task = $task; } /** * @return Application */ public function getApplication() { return $this->app; } /** * @return Task */ public function getTask() { return $this->task; } public function __toString() { return sprintf('Task %d (%s)', $this->task->getId(), $this->task->getName()); } }