1 | <?php |
||
17 | class Calendar extends Component |
||
18 | { |
||
19 | /** |
||
20 | * Methods for calendar components. |
||
21 | * |
||
22 | * According to RFC 5545: 3.7.2. Method |
||
23 | * |
||
24 | * @see http://tools.ietf.org/html/rfc5545#section-3.7.2 |
||
25 | * |
||
26 | * And then according to RFC 2446: 3 APPLICATION PROTOCOL ELEMENTS |
||
27 | * @see https://tools.ietf.org/html/rfc2446#section-3.2 |
||
28 | */ |
||
29 | const METHOD_PUBLISH = 'PUBLISH'; |
||
30 | const METHOD_REQUEST = 'REQUEST'; |
||
31 | const METHOD_REPLY = 'REPLY'; |
||
32 | const METHOD_ADD = 'ADD'; |
||
33 | const METHOD_CANCEL = 'CANCEL'; |
||
34 | const METHOD_REFRESH = 'REFRESH'; |
||
35 | const METHOD_COUNTER = 'COUNTER'; |
||
36 | const METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; |
||
37 | |||
38 | /** |
||
39 | * This property defines the calendar scale used for the calendar information specified in the iCalendar object. |
||
40 | * |
||
41 | * According to RFC 5545: 3.7.1. Calendar Scale |
||
42 | * |
||
43 | * @see http://tools.ietf.org/html/rfc5545#section-3.7 |
||
44 | */ |
||
45 | const CALSCALE_GREGORIAN = 'GREGORIAN'; |
||
46 | |||
47 | /** |
||
48 | * The Product Identifier. |
||
49 | * |
||
50 | * According to RFC 5545: 3.7.3 Product Identifier |
||
51 | * |
||
52 | * This property specifies the identifier for the product that created the Calendar object. |
||
53 | * |
||
54 | * @see https://tools.ietf.org/html/rfc5545#section-3.7.3 |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $prodId = null; |
||
59 | protected $method = null; |
||
60 | protected $name = null; |
||
61 | protected $description = null; |
||
62 | protected $timezone = null; |
||
63 | |||
64 | /** |
||
65 | * This property defines the calendar scale used for the |
||
66 | * calendar information specified in the iCalendar object. |
||
67 | * |
||
68 | * Also identifies the calendar type of a non-Gregorian recurring appointment. |
||
69 | * |
||
70 | * @var string |
||
71 | * |
||
72 | * @see http://tools.ietf.org/html/rfc5545#section-3.7 |
||
73 | * @see http://msdn.microsoft.com/en-us/library/ee237520(v=exchg.80).aspx |
||
74 | */ |
||
75 | protected $calendarScale = null; |
||
76 | |||
77 | /** |
||
78 | * Specifies whether or not the iCalendar file only contains one appointment. |
||
79 | * |
||
80 | * @var bool |
||
81 | * |
||
82 | * @see http://msdn.microsoft.com/en-us/library/ee203486(v=exchg.80).aspx |
||
83 | */ |
||
84 | protected $forceInspectOrOpen = false; |
||
85 | |||
86 | /** |
||
87 | * Specifies a globally unique identifier for the calendar. |
||
88 | * |
||
89 | * @var string |
||
90 | * |
||
91 | * @see http://msdn.microsoft.com/en-us/library/ee179588(v=exchg.80).aspx |
||
92 | */ |
||
93 | protected $calId = null; |
||
94 | |||
95 | /** |
||
96 | * Specifies a suggested iCalendar file download frequency for clients and |
||
97 | * servers with sync capabilities. |
||
98 | * |
||
99 | * For example you can set the value to 'P1W' if the calendar should be |
||
100 | * synced once a week. Use 'P3H' to sync the file every 3 hours. |
||
101 | * |
||
102 | * @var string |
||
103 | * |
||
104 | * @see http://msdn.microsoft.com/en-us/library/ee178699(v=exchg.80).aspx |
||
105 | */ |
||
106 | protected $publishedTTL = null; |
||
107 | |||
108 | /** |
||
109 | * Specifies a color for the calendar in calendar for Apple/Outlook. |
||
110 | * |
||
111 | * @var string |
||
112 | * |
||
113 | * @see http://msdn.microsoft.com/en-us/library/ee179588(v=exchg.80).aspx |
||
114 | */ |
||
115 | protected $calendarColor = null; |
||
116 | |||
117 | 19 | public function __construct($prodId) |
|
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | 17 | public function getType() |
|
133 | |||
134 | /** |
||
135 | * @param $method |
||
136 | * |
||
137 | * @return $this |
||
138 | */ |
||
139 | 1 | public function setMethod($method) |
|
145 | |||
146 | /** |
||
147 | * @param $name |
||
148 | * |
||
149 | * @return $this |
||
150 | */ |
||
151 | 1 | public function setName($name) |
|
157 | |||
158 | /** |
||
159 | * @param $description |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | 1 | public function setDescription($description) |
|
169 | |||
170 | /** |
||
171 | * @param $timezone |
||
172 | * |
||
173 | * @return $this |
||
174 | */ |
||
175 | 2 | public function setTimezone($timezone) |
|
181 | |||
182 | /** |
||
183 | * @param $calendarColor |
||
184 | * |
||
185 | * @return $this |
||
186 | */ |
||
187 | 1 | public function setCalendarColor($calendarColor) |
|
193 | |||
194 | /** |
||
195 | * @param $calendarScale |
||
196 | * |
||
197 | * @return $this |
||
198 | */ |
||
199 | 1 | public function setCalendarScale($calendarScale) |
|
205 | |||
206 | /** |
||
207 | * @param bool $forceInspectOrOpen |
||
208 | * |
||
209 | * @return $this |
||
210 | */ |
||
211 | 1 | public function setForceInspectOrOpen($forceInspectOrOpen) |
|
217 | |||
218 | /** |
||
219 | * @param string $calId |
||
220 | * |
||
221 | * @return $this |
||
222 | */ |
||
223 | 1 | public function setCalId($calId) |
|
229 | |||
230 | /** |
||
231 | * @param string $ttl |
||
232 | * |
||
233 | * @return $this |
||
234 | */ |
||
235 | 1 | public function setPublishedTTL($ttl) |
|
241 | |||
242 | /** |
||
243 | * {@inheritdoc} |
||
244 | */ |
||
245 | 17 | public function buildPropertyBag() |
|
298 | |||
299 | /** |
||
300 | * Adds an Event to the Calendar. |
||
301 | * |
||
302 | * Wrapper for addComponent() |
||
303 | * |
||
304 | * @see Eluceo\iCal::addComponent |
||
305 | * @deprecated Please, use public method addComponent() from abstract Component class |
||
306 | * |
||
307 | * @param Event $event |
||
308 | */ |
||
309 | 1 | public function addEvent(Event $event) |
|
313 | |||
314 | /** |
||
315 | * @return null|string |
||
316 | */ |
||
317 | 1 | public function getProdId() |
|
321 | |||
322 | 1 | public function getMethod() |
|
326 | } |
||
327 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: