X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/25c0f5170a139ce55c0e469318b15f0367e1ce86..b4fea5220b8c3fd880137f0f83d27b31f794860a:/includes/mod_roomReservationTimeslice.inc diff --git a/includes/mod_roomReservationTimeslice.inc b/includes/mod_roomReservationTimeslice.inc deleted file mode 100644 index f6bd997..0000000 --- a/includes/mod_roomReservationTimeslice.inc +++ /dev/null @@ -1,102 +0,0 @@ -setBegin($tsBegin); - $this->setEnd($tsEnd); - } - - /***************************************************************************/ - /** - * @} - * @name Access to attributes - * @{ - */ - - /** - * Set the beginning. Only the time part is used, the date part is ignored. - * If the timestamp is invalid, an Exception is thrown. - * @param $ts (timestamp) - * @throws Exception - */ - public function setBegin($ts) { - if(intval($ts) >= $this->getEnd()) { - throw new Exception(MOD_ROOM_RESERVATION_ERROR_END_BEFORE_BEGIN); - } else { - $this->tsBegin = (intval($ts) % 86400); - } - } - - /** - * Set the ending. Only the time part is used, the date part is ignored. - * If the timestamp is invalid, an Exception is thrown. - * @param $ts (timestamp) - * @throws Exception - */ - public function setEnd($ts) { - if($this->getBegin() >= intval($ts)) { - throw new Exception(MOD_ROOM_RESERVATION_ERROR_END_BEFORE_BEGIN); - } else { - $this->tsEnd = (intval($ts) % 86400); - } - } - - /** - * Get the beginning. - * @return timestamp - */ - public function getBegin() { return $this->tsBegin; } - - /** - * Get the ending. - * @return timestamp - */ - public function getEnd() { return $this->tsEnd; } - - /** @} */ -} -?>