id = $id; $this->title = $title; $this->range = $range; $this->start = $start; $this->end = $end; $this->breakStart = $breakStart; $this->breakEnd = $breakEnd; return $this; } public function getId() { return $this->id; } public function getTitle() { return $this->title; } public function getRange() { return $this->range; } public function getStart() { return $this->start; } public function getEnd() { return $this->end; } public function getBreakStart() { return $this->breakStart; } public function getBreakEnd() { return $this->breakEnd; } public function isAllDay() { $return = FALSE; if( ($this->getStart() == 0) && ($this->getEnd() == 24*60*60) ){ $return = TRUE; } return $return; } public function getDuration() { $start = $this->getStart(); $end = $this->getEnd(); $return = ( $end > $start ) ? ($end - $start) : (24*60*60 - $start) + $end; return $return; } }