/** * Get the profile * * @return Model\Profile */ public function fetch() { if (!is_null($this->profile->getEndTime())) { $this->makeLog(); return $this->profile; } $profile = clone $this->profile; foreach ($this->profilers as $profiler) { $child_profile = $profiler->fetch(); $profile->addProfile($child_profile); } return $profile; }