Path: blob/master/src/applications/calendar/parser/data/PhutilCalendarEventNode.php
12262 views
<?php12final class PhutilCalendarEventNode3extends PhutilCalendarContainerNode {45const NODETYPE = 'event';67private $uid;8private $name;9private $description;10private $startDateTime;11private $endDateTime;12private $duration;13private $createdDateTime;14private $modifiedDateTime;15private $organizer;16private $attendees = array();17private $recurrenceRule;18private $recurrenceExceptions = array();19private $recurrenceDates = array();20private $recurrenceID;2122public function setUID($uid) {23$this->uid = $uid;24return $this;25}2627public function getUID() {28return $this->uid;29}3031public function setName($name) {32$this->name = $name;33return $this;34}3536public function getName() {37return $this->name;38}3940public function setDescription($description) {41$this->description = $description;42return $this;43}4445public function getDescription() {46return $this->description;47}4849public function setStartDateTime(PhutilCalendarDateTime $start) {50$this->startDateTime = $start;51return $this;52}5354public function getStartDateTime() {55return $this->startDateTime;56}5758public function setEndDateTime(PhutilCalendarDateTime $end) {59$this->endDateTime = $end;60return $this;61}6263public function getEndDateTime() {64$end = $this->endDateTime;65if ($end) {66return $end;67}6869$start = $this->getStartDateTime();70$duration = $this->getDuration();71if ($start && $duration) {72return id(new PhutilCalendarRelativeDateTime())73->setOrigin($start)74->setDuration($duration);75}7677// If no end date or duration are specified, the event is instantaneous.78return $start;79}8081public function setDuration(PhutilCalendarDuration $duration) {82$this->duration = $duration;83return $this;84}8586public function getDuration() {87return $this->duration;88}8990public function setCreatedDateTime(PhutilCalendarDateTime $created) {91$this->createdDateTime = $created;92return $this;93}9495public function getCreatedDateTime() {96return $this->createdDateTime;97}9899public function setModifiedDateTime(PhutilCalendarDateTime $modified) {100$this->modifiedDateTime = $modified;101return $this;102}103104public function getModifiedDateTime() {105return $this->modifiedDateTime;106}107108public function setOrganizer(PhutilCalendarUserNode $organizer) {109$this->organizer = $organizer;110return $this;111}112113public function getOrganizer() {114return $this->organizer;115}116117public function setAttendees(array $attendees) {118assert_instances_of($attendees, 'PhutilCalendarUserNode');119$this->attendees = $attendees;120return $this;121}122123public function getAttendees() {124return $this->attendees;125}126127public function addAttendee(PhutilCalendarUserNode $attendee) {128$this->attendees[] = $attendee;129return $this;130}131132public function setRecurrenceRule(133PhutilCalendarRecurrenceRule $recurrence_rule) {134$this->recurrenceRule = $recurrence_rule;135return $this;136}137138public function getRecurrenceRule() {139return $this->recurrenceRule;140}141142public function setRecurrenceExceptions(array $recurrence_exceptions) {143assert_instances_of($recurrence_exceptions, 'PhutilCalendarDateTime');144$this->recurrenceExceptions = $recurrence_exceptions;145return $this;146}147148public function getRecurrenceExceptions() {149return $this->recurrenceExceptions;150}151152public function setRecurrenceDates(array $recurrence_dates) {153assert_instances_of($recurrence_dates, 'PhutilCalendarDateTime');154$this->recurrenceDates = $recurrence_dates;155return $this;156}157158public function getRecurrenceDates() {159return $this->recurrenceDates;160}161162public function setRecurrenceID($recurrence_id) {163$this->recurrenceID = $recurrence_id;164return $this;165}166167public function getRecurrenceID() {168return $this->recurrenceID;169}170171}172173174