public function get_tasks() { $tasks = array(); foreach ($this->children as $child) { $tasks[$child->get_name()] = $child; $tasks += $child->get_tasks(); } return $tasks; }