| 1 |
<?php |
| 2 |
/** |
| 3 |
* iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information. |
| 4 |
* |
| 5 |
* copyright (c) 2007-2021 Kjell-Inge Gustafsson, kigkonsult, All rights reserved |
| 6 |
* Link https://kigkonsult.se |
| 7 |
* Package iCalcreator |
| 8 |
* Version 2.30 |
| 9 |
* License Subject matter of licence is the software iCalcreator. |
| 10 |
* The above copyright, link, package and version notices, |
| 11 |
* this licence notice and the invariant [rfc5545] PRODID result use |
| 12 |
* as implemented and invoked in iCalcreator shall be included in |
| 13 |
* all copies or substantial portions of the iCalcreator. |
| 14 |
* |
| 15 |
* iCalcreator is free software: you can redistribute it and/or modify |
| 16 |
* it under the terms of the GNU Lesser General Public License as published |
| 17 |
* by the Free Software Foundation, either version 3 of the License, |
| 18 |
* or (at your option) any later version. |
| 19 |
* |
| 20 |
* iCalcreator is distributed in the hope that it will be useful, |
| 21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 |
* GNU Lesser General Public License for more details. |
| 24 |
* |
| 25 |
* You should have received a copy of the GNU Lesser General Public License |
| 26 |
* along with iCalcreator. If not, see <https://www.gnu.org/licenses/>. |
| 27 |
* |
| 28 |
* This file is a part of iCalcreator. |
| 29 |
*/ |
| 30 |
|
| 31 |
namespace Kigkonsult\Icalcreator; |
| 32 |
|
| 33 |
/** |
| 34 |
* interface IcalInterface |
| 35 |
* |
| 36 |
* @author Kjell-Inge Gustafsson <ical@kigkonsult.se> |
| 37 |
* @since 2.27.11 - 2019-01-02 |
| 38 |
*/ |
| 39 |
interface IcalInterface |
| 40 |
{ |
| 41 |
/** |
| 42 |
* Class constants, components |
| 43 |
*/ |
| 44 |
const VTIMEZONE = 'Vtimezone'; |
| 45 |
const STANDARD = 'Standard'; |
| 46 |
const DAYLIGHT = 'Daylight'; |
| 47 |
const VEVENT = 'Vevent'; |
| 48 |
const VTODO = 'Vtodo'; |
| 49 |
const VJOURNAL = 'Vjournal'; |
| 50 |
const VFREEBUSY = 'Vfreebusy'; |
| 51 |
const VALARM = 'Valarm'; |
| 52 |
|
| 53 |
/** |
| 54 |
* Class constants, iCal component property names |
| 55 |
*/ |
| 56 |
const ACTION = 'ACTION'; |
| 57 |
const ATTACH = 'ATTACH'; |
| 58 |
const ATTENDEE = 'ATTENDEE'; |
| 59 |
const CALSCALE = 'CALSCALE'; |
| 60 |
const CATEGORIES = 'CATEGORIES'; |
| 61 |
const KLASS = 'CLASS'; // note CLASS |
| 62 |
const COMMENT = 'COMMENT'; |
| 63 |
const COMPLETED = 'COMPLETED'; |
| 64 |
const CONTACT = 'CONTACT'; |
| 65 |
const CREATED = 'CREATED'; |
| 66 |
const DESCRIPTION = 'DESCRIPTION'; |
| 67 |
const DTEND = 'DTEND'; |
| 68 |
const DTSTAMP = 'DTSTAMP'; |
| 69 |
const DTSTART = 'DTSTART'; |
| 70 |
const DUE = 'DUE'; |
| 71 |
const DURATION = 'DURATION'; |
| 72 |
const EXDATE = 'EXDATE'; |
| 73 |
const EXRULE = 'EXRULE'; |
| 74 |
const FREEBUSY = 'FREEBUSY'; |
| 75 |
const GEO = 'GEO'; |
| 76 |
const GEOLOCATION = 'GEOLOCATION'; |
| 77 |
const LAST_MODIFIED = 'LAST-MODIFIED'; |
| 78 |
const LOCATION = 'LOCATION'; |
| 79 |
const METHOD = 'METHOD'; |
| 80 |
const ORGANIZER = 'ORGANIZER'; |
| 81 |
const PERCENT_COMPLETE = 'PERCENT-COMPLETE'; |
| 82 |
const PRIORITY = 'PRIORITY'; |
| 83 |
const PRODID = 'PRODID'; |
| 84 |
const RECURRENCE_ID = 'RECURRENCE-ID'; |
| 85 |
const RELATED_TO = 'RELATED-TO'; |
| 86 |
const REPEAT = 'REPEAT'; |
| 87 |
const REQUEST_STATUS = 'REQUEST-STATUS'; |
| 88 |
const RESOURCES = 'RESOURCES'; |
| 89 |
const RDATE = 'RDATE'; |
| 90 |
const RRULE = 'RRULE'; |
| 91 |
const SEQUENCE = 'SEQUENCE'; |
| 92 |
const STATUS = 'STATUS'; |
| 93 |
const SUMMARY = 'SUMMARY'; |
| 94 |
const TRANSP = 'TRANSP'; |
| 95 |
const TRIGGER = 'TRIGGER'; |
| 96 |
const TZID = 'TZID'; |
| 97 |
const TZNAME = 'TZNAME'; |
| 98 |
const TZOFFSETFROM = 'TZOFFSETFROM'; |
| 99 |
const TZOFFSETTO = 'TZOFFSETTO'; |
| 100 |
const TZURL = 'TZURL'; |
| 101 |
const UID = 'UID'; |
| 102 |
const URL = 'URL'; |
| 103 |
const VERSION = 'VERSION'; |
| 104 |
const X_PROP = 'X-PROP'; |
| 105 |
|
| 106 |
/** |
| 107 |
* Class constants, iCal rfc7986 property names |
| 108 |
*/ |
| 109 |
const COLOR = 'COLOR'; |
| 110 |
const CONFERENCE = 'CONFERENCE'; |
| 111 |
const IMAGE = 'IMAGE'; |
| 112 |
const NAME = 'NAME'; |
| 113 |
const REFRESH_INTERVAL = 'REFRESH-INTERVAL'; |
| 114 |
const SOURCE = 'SOURCE'; |
| 115 |
|
| 116 |
/** |
| 117 |
* iCal property METHOD types |
| 118 |
*/ |
| 119 |
const PUBLISH = 'PUBLISH'; |
| 120 |
const REQUEST = 'REQUEST'; |
| 121 |
const REPLY = 'REPLY'; |
| 122 |
const ADD = 'ADD'; |
| 123 |
const CANCEL = 'CANCEL'; |
| 124 |
const REFRESH = 'REFRESH'; |
| 125 |
const COUNTER = 'COUNTER'; |
| 126 |
const DECLINECOUNTER = 'DECLINECOUNTER'; |
| 127 |
|
| 128 |
/** |
| 129 |
* iCal property CALSCALE default value |
| 130 |
*/ |
| 131 |
const GREGORIAN = 'GREGORIAN'; |
| 132 |
|
| 133 |
/** |
| 134 |
* iCal global component parameter keywords |
| 135 |
*/ |
| 136 |
const ALTREP = 'ALTREP'; // Alternate Text Representation |
| 137 |
const LANGUAGE = 'LANGUAGE'; // values defined in [RFC5646] |
| 138 |
const VALUE = 'VALUE'; |
| 139 |
|
| 140 |
/** |
| 141 |
* iCal component properties VALUE parameter key values |
| 142 |
* |
| 143 |
* DURATION, set above, // TRIGGERtrait |
| 144 |
*/ |
| 145 |
const BINARY = 'BINARY'; |
| 146 |
const BOOLEAN = 'BOOLEAN'; |
| 147 |
const CAL_ADDRESS = 'CAL_ADDRESS'; |
| 148 |
const DATE = 'DATE'; // YYYYMMDD |
| 149 |
const DATE_TIME = 'DATE-TIME'; // YYYYMMDDTHHMMDD[Z/timezone] |
| 150 |
const FLOAT = 'FLOAT'; |
| 151 |
const INTEGER = 'INTEGER'; |
| 152 |
const PERIOD = 'PERIOD'; // date-time / date-time or date-time / dur-value |
| 153 |
const RECUR = 'RECUR'; |
| 154 |
const TEXT = 'TEXT'; |
| 155 |
const TIME = 'TIME'; // HHMMSS |
| 156 |
const URI = 'URI'; // Section 3 of [RFC3986] |
| 157 |
const UTC_OFFSET = 'UTC-OFFSET'; // ("+" / "-") time-hour time-minute [time-second |
| 158 |
|
| 159 |
/** |
| 160 |
* iCal component properties ATTENDEE/ORGANIZER parameter keywords |
| 161 |
*/ |
| 162 |
const CUTYPE = 'CUTYPE'; // Calendar User Type |
| 163 |
const MEMBER = 'MEMBER'; // Group or List Membership |
| 164 |
const ROLE = 'ROLE'; // Participation Role |
| 165 |
const PARTSTAT = 'PARTSTAT'; // Participation Status |
| 166 |
const RSVP = 'RSVP'; // 'reply expected' |
| 167 |
const DELEGATED_TO = 'DELEGATED-TO'; // Delegatees |
| 168 |
const DELEGATED_FROM = 'DELEGATED-FROM'; // Delegators |
| 169 |
const SENT_BY = 'SENT-BY'; |
| 170 |
const CN = 'CN'; // Common name |
| 171 |
const DIR = 'DIR'; // Directory Entry Reference |
| 172 |
|
| 173 |
/** |
| 174 |
* iCal component properties ATTENDEE/ORGANIZER CUTYPE parameter key values |
| 175 |
*/ |
| 176 |
const GROUP = 'GROUP'; |
| 177 |
const INDIVIDUAL = 'INDIVIDUAL'; // (default) |
| 178 |
const RESOURCE = 'RESOURCE'; |
| 179 |
const ROOM = 'ROOM'; |
| 180 |
const UNKNOWN = 'UNKNOWN'; |
| 181 |
|
| 182 |
/** |
| 183 |
* iCal component properties ATTENDEE PARTSTAT parameter key values |
| 184 |
* |
| 185 |
* COMPLETED, Vtodo, set above |
| 186 |
*/ |
| 187 |
const NEEDS_ACTION = 'NEEDS-ACTION'; // Vevent, Vtodo, Vjournal (default) |
| 188 |
const ACCEPTED = 'ACCEPTED'; // Vevent, Vtodo, Vjournal |
| 189 |
const DECLINED = 'DECLINED'; // Vevent, Vtodo, Vjournal |
| 190 |
const TENTATIVE = 'TENTATIVE'; // Vevent, Vtodo |
| 191 |
const DELEGATED = 'DELEGATED'; // Vevent, Vtodo |
| 192 |
const IN_PROCESS = 'IN-PROCESS'; // Vtodo |
| 193 |
|
| 194 |
/** |
| 195 |
* iCal component properties ATTENDEE ROLE parameter keywords |
| 196 |
*/ |
| 197 |
const CHAIR = 'CHAIR'; |
| 198 |
const REQ_PARTICIPANT = 'REQ-PARTICIPANT'; // (default) |
| 199 |
const OPT_PARTICIPANT = 'OPT-PARTICIPANT'; |
| 200 |
const NON_PARTICIPANT = 'NON-PARTICIPANT'; |
| 201 |
|
| 202 |
/** |
| 203 |
* iCal component property param value, VALUE=BOOLEAN, ex ATTENDEE param key RSVP |
| 204 |
*/ |
| 205 |
const FALSE = 'FALSE'; |
| 206 |
const TRUE = 'TRUE'; |
| 207 |
|
| 208 |
/** |
| 209 |
* iCal component properties RRULE, EXRULE 'RECUR' keywords |
| 210 |
*/ |
| 211 |
const FREQ = 'FREQ'; |
| 212 |
const UNTIL = 'UNTIL'; |
| 213 |
const COUNT = 'COUNT'; |
| 214 |
const INTERVAL = 'INTERVAL'; |
| 215 |
const BYSECOND = 'BYSECOND'; |
| 216 |
const BYMINUTE = 'BYMINUTE'; |
| 217 |
const BYHOUR = 'BYHOUR'; |
| 218 |
const BYDAY = 'BYDAY'; |
| 219 |
const BYMONTHDAY = 'BYMONTHDAY'; |
| 220 |
const BYYEARDAY = 'BYYEARDAY'; |
| 221 |
const BYWEEKNO = 'BYWEEKNO'; |
| 222 |
const BYMONTH = 'BYMONTH'; |
| 223 |
const BYSETPOS = 'BYSETPOS'; |
| 224 |
const WKST = 'WKST'; |
| 225 |
const SECONDLY = 'SECONDLY'; // FREQ value |
| 226 |
const MINUTELY = 'MINUTELY'; // FREQ value |
| 227 |
const HOURLY = 'HOURLY'; // FREQ value |
| 228 |
const DAILY = 'DAILY'; // FREQ value |
| 229 |
const WEEKLY = 'WEEKLY'; // FREQ value |
| 230 |
const MONTHLY = 'MONTHLY'; // FREQ value |
| 231 |
const YEARLY = 'YEARLY'; // FREQ value |
| 232 |
const DAY = 'DAY'; |
| 233 |
const SU = 'SU'; // SUNDAY |
| 234 |
const MO = 'MO'; // MONDAY |
| 235 |
const TU = 'TU'; // TUESDAY |
| 236 |
const WE = 'WE'; // WEDNESDAY |
| 237 |
const TH = 'TH'; // THURSDAY |
| 238 |
const FR = 'FR'; // FRIDAY |
| 239 |
const SA = 'SA'; // SATURDAY |
| 240 |
|
| 241 |
/** |
| 242 |
* iCal component property ACTION, IMAGE values |
| 243 |
*/ |
| 244 |
const AUDIO = 'AUDIO'; |
| 245 |
const DISPLAY = 'DISPLAY'; |
| 246 |
const EMAIL = 'EMAIL'; |
| 247 |
const PROCEDURE = 'PROCEDURE'; // Deprecated in rfc5545 |
| 248 |
|
| 249 |
/** |
| 250 |
* iCal component property IMAGE parameter key DISPLAY values |
| 251 |
*/ |
| 252 |
const BADGE = 'BADGE'; // default |
| 253 |
const GRAPHIC = 'GRAPHIC'; |
| 254 |
const FULLSIZE = 'FULLSIZE'; |
| 255 |
const THUMBNAIL = 'THUMBNAIL'; |
| 256 |
|
| 257 |
/** |
| 258 |
* iCal component property ATTACH, IMAGE parameter keywords |
| 259 |
* |
| 260 |
* VALUE, defined above |
| 261 |
*/ |
| 262 |
const ENCODING = 'ENCODING'; // Inline Encoding |
| 263 |
const FMTTYPE = 'FMTTYPE'; // (Inline ) Format Type (media type [RFC4288]) |
| 264 |
|
| 265 |
/** |
| 266 |
* iCal component property CONFERENCE parameter keywords |
| 267 |
* |
| 268 |
* VALUE, defined above |
| 269 |
*/ |
| 270 |
const FEATURE = 'FEATURE'; |
| 271 |
const LABEL = 'LABEL'; |
| 272 |
|
| 273 |
/** |
| 274 |
* iCal component property CONFERENCE parameter key FEATURE values |
| 275 |
* |
| 276 |
* AUDIO, defined above |
| 277 |
*/ |
| 278 |
const CHAT = 'CHAT'; |
| 279 |
const FEED = 'FEED'; |
| 280 |
const MODERATOR = 'MODERATOR'; |
| 281 |
const PHONE = 'PHONE'; |
| 282 |
const SCREEN = 'SCREEN'; |
| 283 |
const VIDEO = 'VIDEO'; |
| 284 |
|
| 285 |
/** |
| 286 |
* iCal component property ATTACH, IMAGE parameter key ENCODING values |
| 287 |
*/ |
| 288 |
const EIGHTBIT = '8BIT'; // e.i 8BIT... |
| 289 |
const BASE64 = 'BASE64'; |
| 290 |
|
| 291 |
/** |
| 292 |
* iCal component property CLASS values |
| 293 |
*/ |
| 294 |
const P_BLIC = 'PUBLIC'; // note PUBLIC |
| 295 |
const P_IVATE = 'PRIVATE'; // note PRIVATE |
| 296 |
const CONFIDENTIAL = 'CONFIDENTIAL'; |
| 297 |
|
| 298 |
/** |
| 299 |
* iCal component property FREEBUZY parameter keyword |
| 300 |
*/ |
| 301 |
const FBTYPE = 'FBTYPE'; // Free/Busy Time Type |
| 302 |
|
| 303 |
/** |
| 304 |
* iCal component property FREEBUZY parameter key FBTYPE values |
| 305 |
*/ |
| 306 |
const FREE = 'FREE'; |
| 307 |
const BUSY = 'BUSY'; |
| 308 |
const BUSY_UNAVAILABLE = 'BUSY-UNAVAILABLE'; |
| 309 |
const BUSY_TENTATIVE = 'BUSY-TENTATIVE'; |
| 310 |
|
| 311 |
/** |
| 312 |
* iCal component property RECURRENCE-ID parameter keyword |
| 313 |
*/ |
| 314 |
const RANGE = 'RANGE'; // Recurrence Identifier Range |
| 315 |
|
| 316 |
/** |
| 317 |
* iCal component property RECURRENCE-ID parameter key value |
| 318 |
*/ |
| 319 |
const THISANDFUTURE = 'THISANDFUTURE'; // RANGE value |
| 320 |
|
| 321 |
|
| 322 |
/** |
| 323 |
* iCal component property RELATED-TO parameter keyword |
| 324 |
*/ |
| 325 |
const RELTYPE = 'RELTYPE'; // Relationship Type |
| 326 |
|
| 327 |
/** |
| 328 |
* iCal component property RELATED-TO parameter key RELTYPE value |
| 329 |
*/ |
| 330 |
const PARENT = 'PARENT'; // (default) |
| 331 |
const CHILD = 'CHILD'; |
| 332 |
const SIBLING = 'SIBLING'; |
| 333 |
|
| 334 |
/** |
| 335 |
* iCal component property TRIGGER parameter keyword |
| 336 |
*/ |
| 337 |
const RELATED = 'RELATED'; |
| 338 |
|
| 339 |
/** |
| 340 |
* iCal component property TRIGGER parameter key TRIGGER values |
| 341 |
*/ |
| 342 |
const START = 'START'; |
| 343 |
const END = 'END'; |
| 344 |
|
| 345 |
/** |
| 346 |
* iCal component property GEO parts |
| 347 |
*/ |
| 348 |
const LATITUDE = 'latitude'; |
| 349 |
const LONGITUDE = 'longitude'; |
| 350 |
|
| 351 |
/** |
| 352 |
* iCal component property Request-status parts |
| 353 |
*/ |
| 354 |
const STATCODE = 'statcode'; |
| 355 |
const STATDESC = 'statdesc'; |
| 356 |
const EXTDATA = 'extdata'; |
| 357 |
|
| 358 |
/** |
| 359 |
* iCal component property STATUS values |
| 360 |
* |
| 361 |
* NEEDS_ACTION, defined above // Vtodo |
| 362 |
* TENTATIVE, defined above // Vevent |
| 363 |
* COMPLETED, defined above // Vtodo |
| 364 |
* IN_PROCESS // Vtodo |
| 365 |
*/ |
| 366 |
const CONFIRMED = 'CONFIRMED'; // Vevent |
| 367 |
const CANCELLED = 'CANCELLED'; // Vevent, Vtodo, Vjournal |
| 368 |
const DRAFT = 'DRAFT'; // Vjournal |
| 369 |
const F_NAL = 'FINAL'; // Vjournal |
| 370 |
|
| 371 |
/** |
| 372 |
* iCal component property TRANSP values |
| 373 |
*/ |
| 374 |
const OPAQUE = 'OPAQUE'; // default |
| 375 |
const TRANSPARENT = 'TRANSPARENT'; |
| 376 |
|
| 377 |
/** |
| 378 |
* UTC DateTimezones |
| 379 |
*/ |
| 380 |
const Z = 'Z'; |
| 381 |
const UTC = 'UTC'; |
| 382 |
const GMT = 'GMT'; |
| 383 |
|
| 384 |
/** |
| 385 |
* Calendar extension x-properties, some... |
| 386 |
* @link http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions |
| 387 |
*/ |
| 388 |
const X_WR_CALNAME = 'X-WR-CALNAME'; |
| 389 |
const X_WR_CALDESC = 'X-WR-CALDESC'; |
| 390 |
const X_WR_RELCALID = 'X-WR-RELCALID'; |
| 391 |
const X_WR_TIMEZONE = 'X-WR-TIMEZONE'; |
| 392 |
const X_LIC_LOCATION = 'X-LIC-LOCATION'; |
| 393 |
|
| 394 |
/** |
| 395 |
* Vcalendar::selectComponents() added component x-property names |
| 396 |
*/ |
| 397 |
const X_CURRENT_DTSTART = 'X-CURRENT-DTSTART'; |
| 398 |
const X_CURRENT_DTEND = 'X-CURRENT-DTEND'; |
| 399 |
const X_CURRENT_DUE = 'X-CURRENT-DUE'; |
| 400 |
const X_RECURRENCE = 'X-RECURRENCE'; |
| 401 |
const X_OCCURENCE = 'X-OCCURENCE'; |
| 402 |
|
| 403 |
/** |
| 404 |
* Class constants, config keys |
| 405 |
* |
| 406 |
* LANGUAGE, TZID and URL, set above |
| 407 |
*/ |
| 408 |
const ALLOWEMPTY = 'ALLOWEMPTY'; |
| 409 |
const COMPSINFO = 'COMPSINFO'; |
| 410 |
const UNIQUE_ID = 'UNIQUE_ID'; |
| 411 |
const PROPINFO = 'PROPINFO'; |
| 412 |
const SETPROPERTYNAMES = 'SETPROPERTYNAMES'; |
| 413 |
} |
| 414 |
|