id = $timeframeModel->id; $timeframe->name = $timeframeModel->name; $timeframe->title = $timeframeModel->title; $timeframe->start = $timeframeModel->start; $timeframe->end = $timeframeModel->end; return $timeframe; } /** * @return int */ public function getId() { return $this->id; } /** * @return string */ public function getName() { return $this->name; } /** * @return string */ public function getTitle() { return $this->title; } /** * @return string */ public function getStart() { return $this->start; } /** * @return string */ public function getEnd() { return $this->end; } public function getTimerange() { $start = new \DateTime($this->getStart()); $end = new \DateTime($this->getEnd()); return new Timerange($start, $end); } }