setUid(null); $this->setRoom($strRoom); $this->setDate($tsDate); $this->setTsFirst($nTsFirst); $this->setTsLast($nTsLast); $this->setAct($strAct); $this->setReason($strReason); $this->setInterval($nInterval); } /***************************************************************************/ /** * @} * @name Access to attributes * @{ */ /** * Set the unique ID in database * @param $n (int) Unique ID in database * @return void */ public function setUid($n) { if(is_null($n)) { $this->nUid = null; } else { $this->nUid = intval($n); } } /** * Set the name of the room * @param $str (string) Name of the room * @return void */ public function setRoom($str) { $this->strRoom = $str; } /** * Set the date when the booking takes place * @param $ts (timestamp) Date, only the date part is taken care of * @return void */ public function setDate($ts) { // Only take the date part $this->tsDate = intval(strtotime(date("Y\-m\-d", intval($ts)))); } /** * Set the first timeslice * @param $n (int) Number of the first timeslice * @return void */ public function setTsFirst($n) { $this->nTsFirst = intval($n); } /** * Set the end timeslice * @param $n (int) Number of the last timeslice (may be the start timeslice) * @return void */ public function setTsLast($n) { $this->nTsLast = intval($n); } /** * Set the account name of the owner * @param $str (string) Account name * @return void */ public function setAct($str) { $this->strAct = $str; } /** * Set the reason for the booking * @param $str (string) Reason * @return void */ public function setReason($str) { $this->strReason = $str; } /** * Set the flag whether the booking repeates every week * @param $n (int) interval in weeks, 0 for no recurrence * @return void */ public function setInterval($n) { $this->nInterval = intval(abs($n)); } /** * Get the unique ID in database * @return int / null */ public function getUid() { return intval($this->nUid); } /** * Get the name of the room * @return string */ public function getRoom() { return $this->strRoom; } /** * Get the date when the booking takes place * @return timestamp */ public function getDate() { return intval($this->tsDate); } /** * Get the the number of the first timeslice * @return int */ public function getTsFirst() { return intval($this->nTsFirst); } /** * Get the number of the last timeslice (may be the start timeslice) * @return int */ public function getTsLast() { return intval($this->nTsLast); } /** * Get the account name of the owner * @return string */ public function getAct() { return $this->strAct; } /** * Get the reason for the booking * @return string */ public function getReason() { return $this->strReason; } /** * Get the recurrence interval * @return int */ public function getInterval() { return $this->nInterval; } /**@}*/ } ?>