1 | <?php |
||
21 | class Alarm extends Component |
||
22 | { |
||
23 | /** |
||
24 | * Alarm ACTION property. |
||
25 | * |
||
26 | * According to RFC 5545: 3.8.6.1. Action |
||
27 | * |
||
28 | * @see http://tools.ietf.org/html/rfc5545#section-3.8.6.1 |
||
29 | */ |
||
30 | const ACTION_AUDIO = 'AUDIO'; |
||
31 | const ACTION_DISPLAY = 'DISPLAY'; |
||
32 | const ACTION_EMAIL = 'EMAIL'; |
||
33 | |||
34 | protected $action; |
||
35 | protected $repeat; |
||
36 | protected $duration; |
||
37 | protected $description; |
||
38 | protected $attendee; |
||
39 | protected $trigger; |
||
40 | |||
41 | 1 | public function getType() |
|
45 | |||
46 | 1 | public function getAction() |
|
47 | { |
||
48 | 1 | return $this->action; |
|
49 | } |
||
50 | |||
51 | 1 | public function getRepeat() |
|
52 | { |
||
53 | 1 | return $this->repeat; |
|
54 | } |
||
55 | |||
56 | 1 | public function getDuration() |
|
57 | { |
||
58 | 1 | return $this->duration; |
|
59 | } |
||
60 | |||
61 | 1 | public function getDescription() |
|
62 | { |
||
63 | 1 | return $this->description; |
|
64 | } |
||
65 | |||
66 | 1 | public function getAttendee() |
|
67 | { |
||
68 | 1 | return $this->attendee; |
|
69 | } |
||
70 | |||
71 | 1 | public function getTrigger() |
|
72 | { |
||
73 | 1 | return $this->trigger; |
|
74 | } |
||
75 | |||
76 | 2 | public function setAction($action) |
|
82 | |||
83 | 1 | public function setRepeat($repeat) |
|
84 | { |
||
85 | 1 | $this->repeat = $repeat; |
|
86 | |||
87 | 1 | return $this; |
|
88 | } |
||
89 | |||
90 | 1 | public function setDuration($duration) |
|
91 | { |
||
92 | 1 | $this->duration = $duration; |
|
93 | |||
94 | 1 | return $this; |
|
95 | } |
||
96 | |||
97 | 2 | public function setDescription($description) |
|
103 | |||
104 | 1 | public function setAttendee($attendee) |
|
105 | { |
||
106 | 1 | $this->attendee = $attendee; |
|
107 | |||
108 | 1 | return $this; |
|
109 | } |
||
110 | |||
111 | 2 | public function setTrigger($trigger) |
|
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | 7 | public function buildPropertyBag() |
|
122 | { |
||
123 | 7 | $propertyBag = new PropertyBag(); |
|
124 | |||
125 | 7 | if (null != $this->trigger) { |
|
126 | 2 | $propertyBag->set('TRIGGER', $this->trigger); |
|
151 | } |
||
152 |