iCalcreator v2.41.70

iCalcreator v2.41.70
Copyright © 2007-2022 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.
Copyright_and_Licence
kigkonsult.se
Contact iCal_at_kigkonsult_dot_se

Preface

This document describes usage of iCalcreator, the PHP software implementation of standards rfc5545/ rfc5546/ rfc5870/ rfc6321/ rfc6868/ rfc7529/ rfc7808/ rfc7986/ rfc9073/ rfc9074 and other IETF rfc documents to manage calendar information. The fc5545/rfc5546 obsoletes rfc2445/rfc2446.

This document is provided by kigkonsult for informational purposes and is provided on an "as is" basis without any warranties expressed or implied.

Information in this document is subject to change without notice and does not represent a commitment on the part of kigkonsult. The software described in this document is provided under a license agreement. The software may be used only in accordance with the terms of that license agreement. It is against the law to copy or use the software except as specifically allowed in the license agreement.

It is the users responsibility to ensure the suitability of the software before using it. In no circumstances will kigkonsult be responsible for the use of the software's outcomes or results or any loss or damage of data or programs as a result of using the software.

The use of the software implies acceptance of these terms and the license.

This document makes previous versions obsolete.

[index]

1 INTRO

iCalcreator is the PHP class package managing iCal calendar information, supporting (non-)calendar systems and applications to process and communicate calendar information like events, agendas, tasks, reports, totos and journaling information.

iCalcreator features create, parse, edit and select calendar and calendar components.

For iCalcreator 2.40 version (and later), PHP version >= 8.0 is required, version v2.39 PHP7+. To support the development, maintenance and test process PHPCompatibility, PHPStan and php-arguments-detector are included.


[index] [top]

1.1 Standards

iCal

A short iCal description is found at Wikipedia. If You are not familiar with iCal, read this first!

The iCalendar format, iCal, are described in

rfc5545
quot;Internet Calendaring and Scheduling Core Object Specification (iCalendar)"quot;
rfc5546
"iCalendar Transport-Independent Interoperability Protocol (iTIP)"
Scheduling Events, BusyTime, To-dos and Journal Entries

. ..allows for the capture and exchange of information normally stored within a calendaring and scheduling application.

and

. ..is an exchange format between applications or systems.

rfc5870
"A Uniform Resource Identifier for Geographic Locations (geo URI)"
rfc6321
"xCal: The XML Format for iCalendar"
rfc6868
"Parameter Value Encoding in iCalendar and vCard"
rfc7529
"Non-Gregorian Recurrence Rules in the Internet Calendaring and Scheduling Core Object Specification (iCalendar)"
rfc7808
"Time Zone Data Distribution Service"
rfc7953
"Calendar Availability"
rfc7986
"New Properties for iCalendar"
rfc9073
"Event Publishing Extensions to iCalendar"
rfc9074
"VALARM Extensions for iCalendar"

rfc5545 and rfc5546 obsoletes, respectively, rfc2445 and rfc2446.

For IETF rfc documents, copyright and licence, see the "Copyright Notice" content part in top of each IETF rfc document.

A short xCal description is found at Wikipedia.


[index] [top]

1.2 This manual

This style is used for text.

This style is used for formats.

This style is used for PHP coding examples. // this style is used for coding comments.

This style is used for content details.

This style may be used for quotes and/or extracts.


[index] [top]

1.3 Versioning

The release numbering convention used is major.minor(.micro / suffix).

Major
Indicates a very large change in the core package. Rewrites or major milestones.
Minor
Significant amount of feature addition/modification.
odd number - development/experimental release
even number - production release
Micro
Primarily bug fix and maintenance number.
Suffix (opt)
rc1 for first release candidate etc.

The release plan is based on yearly releases with exception of emergency releases.


[index] [top]

1.4 Support

For bug report or support request, use github issues.

For previous iCalcreator (master) releases or non-emergency issues, support upon (paid) request only.

kigkonsult offer professional services for software support, design and new/re-development and unit tests of PHP/MySQL solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.


[index] [top]

1.5 Donate

You can show your appreciation for our free software, and can support future development by making a donation to the kigkonsult project iCalcreator using paypal.me/kigkonsult. For invoice, please e-mail.


[index] [top]

1.6 Install

Composer (https://getcomposer.org/)
 
composer require kigkonsult/icalcreator
 
Or
include the (download) iCalcreator folder to your include-path
Add
require_once "[path/]iCalcreator-2.41.70/autoload.php";
to your PHP-script.

Builds :

v2.41.70
v2.42 pre-release
v2.40
stable PHP8
v2.39
PHP7

iCalcreator 2.41.70 is using namespace "Kigkonsult\Icalcreator".


[index] [top]

1.7 Major changes

Here are update headlines in this version.


[index] [top]

1.8 Additional descriptors

Some properties (ex. as described in wikipedia:iCal) may be required when importing iCal formatted data into some calendaring software (MS etc). Also X-properties may appear in exports. Below are examples

on calendar level
METHOD property (value PUBLISH etc.)
X-WR-CALNAME x-property
X-WR-CALDESC x-property
X-WR-RELCALID x-property (Read more info about UUID.)
X-WR-TIMEZONE x-property
on component level
DTSTAMP *
UID *
on component level in a vtimezone component
X-LIC-LOCATION x-property

* Created automatically in iCalcreator at component creation.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::METHOD,
- Kigkonsult\Icalcreator\Vcalendar::X_WR_CALNAME,
- Kigkonsult\Icalcreator\Vcalendar::X_WR_CALDESC,
- Kigkonsult\Icalcreator\Vcalendar::X_WR_RELCALID,
- Kigkonsult\Icalcreator\Vcalendar::X_WR_TIMEZONE,
- Kigkonsult\Icalcreator\Vcalendar::X_LIC_LOCATION
are available.

Example

A strong recommendation is also to set config unique_id when creating a new Vcalendar instance, to ensure accurate setting of PRODID property. Also setting "X-WR-TIMEZONE" (below) is to recommend.

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vcalendar->setMethod( Vcalendar::PUBLISH ) ->setXprop( Vcalendar::X_WR_CALNAME, "Calendar Sample" ) ->setXprop( Vcalendar::X_WR_CALDESC, "Calendar Description" ) ->setXProp( Vcalendar::X_WR_RELCALID, "3E26604A-50F4-4449-8B3E-E4F4932D05B5" ) ->setXprop( Vcalendar::X_WR_TIMEZONE, "Europe/Stockholm" );


[index] [top]

1.9 INDEX

1 INTRO

1.1 Standards
1.2 This manual
1.3 Versioning
1.4 Support
1.5 Donate
1.6 Install
1.7 Major changes
1.8 Additional descriptors
1.9 INDEX

2 Calendar Component list

2.1 VCALENDAR
2.2 VEVENT
2.3 VTODO
2.4 VJOURNAL
2.5 VFREEBUSY
2.6 VALARM
2.7 PARTICIPANT
2.8 VLOCATION
2.9 VRESOURCE
2.10 VAVAILABILITY
2.11 AVAILABLE
2.14 VTIMEZONE

3 Methods

3.1 Vcalendar methods

3.1.1 Constructors
3.1.1.1 Vcalendar
3.1.1.2 Vevent
3.1.1.3 Vtodo
3.1.1.4 Vjournal
3.1.1.5 Vfreebusy
3.1.1.6 Valarm
3.1.1.7 Vavailability
3.1.1.8 Available
3.1.1.9 Participant
3.1.1.10 Vlocation
3.1.1.11 Vresource
3.1.1.12 Vtimezone
3.1.1.13 Standard / Daylight

3.1.2 Vcalendar property methods
3.1.2.1 CALSCALE
3.1.2.2 METHOD
3.1.2.3 VERSION

3.1.3 Vcalendar component object methods
3.1.3.1 deleteComponent
3.1.3.2 getComponent
3.1.3.3 getComponents
3.1.3.4 replaceComponent
3.1.3.5 selectComponents
3.1.3.6 setComponent

3.1.4 Vcalendar calendar methods
3.1.4.1 parse and merge
3.1.4.2 createCalendar
3.1.4.3 returnCalendar
3.1.4.4 sort
3.1.4.5 countComponents
3.1.4.6 iCalcreatorVersion
3.1.4.7 vtimezonePopulate

3.1.5 Vcalendar configuration
3.1.5.1 configuration keys
3.1.5.2 getConfig
3.1.5.3 calendar/component initialization
3.1.5.4 setConfig
3.1.5.5 Allow empty components
3.1.5.6 Component information
3.1.5.7 Language
3.1.5.8 setPropertyNames
3.1.5.9 Unique_id

3.2 Component property methods
3.2.1 Date restraints
3.2.2 Property value/params
3.2.3 Parse
Properties in ascending name order
3.2.4 ACKNOWLEDGED
3.2.5 ACTION
3.2.6 ATTACH
3.2.7 ATTENDEE
3.2.8 BUSYTYPE
3.2.9 CALENDAR-ADDRESS
3.2.10 CATEGORIES
3.2.11 CLASS
3.2.12 COLOR
3.2.13 COMMENT
3.2.14 COMPLETED
3.2.15 CONFERENCE
3.2.16 CONTACT
3.2.17 CREATED
3.2.18 DESCRIPTION
3.2.19 DTEND
3.2.20 DTSTAMP
3.2.21 DTSTART
3.2.22 DUE
3.2.22 DURATION
3.2.24 EXDATE
3.2.25 EXRULE
3.2.26 FREEBUSY
3.2.27 GEO
3.2.28 IMAGE
3.2.29 LAST-MODIFIED
3.2.30 LOCATION
3.2.31 LOCATION-TYPE
3.2.32 NAME
3.2.33 ORGANIZER
3.2.34 PARTICIPANT-TYPE
3.2.35 PERCENT-COMPLETE
3.2.36 PRIORITY
3.2.37 PROXIMITY
3.2.38 RDATE
3.2.39 RECURRENCE-ID
3.2.40 REFRESH-INTERVAL
3.2.41 RELATED-TO
3.2.42 REPEAT
3.2.43 REQUEST-STATUS
3.2.44 RESOURCE-TYPE
3.2.45 RESOURCES
3.2.46 RRULE
3.2.47 SEQUENCE
3.2.48 SOURCE
3.2.49 STATUS
3.2.50 STRUCTURED-DATA
3.2.51 STYLED-DESCRIPTION
3.2.52 SUMMARY
3.2.53 TRANSP
3.2.54 TRIGGER
3.2.55 TZID
3.2.56 TZID-ALIAS-OF
3.2.57 TZNAME
3.2.58 TZOFFSETFROM
3.2.59 TZOFFSETTO
3.2.60 TZUNTIL
3.2.61 TZURL
3.2.62 UID
3.2.63 URL
3.2.64 X-PROPERTY
3.3 iCalcreator Component configuration methods
3.3.1 Language

3.4 iCalcreator misc. methods
3.4.1 deleteComponent
3.4.2 getComponent
3.4.3 getComponents
3.4.4 setComponent
3.4.5 Vtimezone populate
3.4.6 Review timezones, opt alter to PHP timezone

4 XML, json and vCard support
4.3 iCalcreator and (RFC6321) XML
4.3.1 iCal2XML
4.3.2 XML2iCal
4.4 iCalcreator and json export
4.5 iCalcreator and iCalvCardFactory class
4.5.1 iCal2vCard
4.5.2 iCal2vCards

5 COPYRIGHT AND LICENSE

[index] [top]

2 Calendar Component list

Note, to ease up usage, you will find convenient constants for component names, properties, config keys etc in (src/)IcalInterface.

2.1 VCALENDAR

VAVAILABILITY (availabilityc below), as described in rfc7953 "Calendar Availability"
may NOT be supported by all calendaring software.g1
Properties suffixed by "*", described in rfc7986 "New Properties for iCalendar"
may NOT be supported by all calendaring software.
If not set, UID property is automatically created by iCalcreator at instance creation or using Vcalendar method returnCalendar or component::getUid() (UID) methods.

icalobject = 1*("BEGIN" ":" "VCALENDAR" CRLF

icalbody

"END" ":" "VCALENDAR" CRLF)

icalbody = calprops component

calprops = *(

REQUIRED, MUST NOT occur more than once

prodid / version /

OPTIONAL, MUST NOT occur more than once

calscale / method /

uid* / last-mod* / url* / refresh* / source* / color*

OPTIONAL and MAY occur more than once

name* / description* / categories* / image*

x-prop

)

component = 1*( eventc / todoc / journalc / freebusyc / timezonec / availabilityc / iana-comp1 / x-comp1 )

iana-comp = "BEGIN" ":" iana-token CRLF

1*contentline

"END" ":" iana-token CRLF

x-comp = "BEGIN" ":" x-name CRLF

1*contentline

"END" ":" x-name CRLF

1) not supported by iCalcreator

[index] [top] [up]

2.2 VEVENT

Properties suffixed by "*", described in rfc7986 "New Properties for iCalendar", may NOT be supported by all calendaring software.

Components and properties suffixed by "*2", described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

"BEGIN" ":" "VEVENT" CRLF

eventprop *alarmc *participantc*2 *locationc*2 *resoucec*2

"END" ":" "VEVENT" CRLF

eventprop = *(

OPTIONAL, MUST NOT occur more than once

color* / class / created / description / dtstart / geo /

last-mod / location / organizer / priority / dtstamp / seq /

status / summary / transp / uid / url / recurid /

either "dtend" or "duration" may appear in a "eventprop",
but "dtend" and "duration" MUST NOT occur in the same "eventprop"

dtend / duration /

OPTIONAL and MAY occur more than once

attach / attendee / categories / comment / conference* / contact /

exdate / exrule / image* / rstatus / related / resources /

rdate / rrule / styleddescription*2 / sdataprop*2 / x-prop

)

[index] [top] [up]

2.3 VTODO

Properties suffixed by "*", described in rfc7986 "New Properties for iCalendar", may NOT be supported by all calendaring software.

Components and properties suffixed by "*2", described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

"BEGIN" ":" "VTODO" CRLF

todoprop *alarmc *participantc*2 *locationc*2 *resoucec*2

"END" ":" "VTODO" CRLF

todoprop = *(

OPTIONAL, MUST NOT occur more than once

class / color* / completed / created / description / dtstamp / dtstart /

geo / last-mod / location / organizer / percent / priority /

recurid / seq / status / summary / uid / url /

either "due" or "duration" may appear in a "todoprop",
but "due" and "duration" MUST NOT occur in the same "todoprop"

due / duration /

OPTIONAL and MAY occur more than once

attach / attendee / categories / comment / conference* / contact /

image* / exdate / exrule / rstatus / related / resources /

rdate / rrule / styleddescription*2 / sdataprop*2 / x-prop

)

[index] [top] [up]

2.4 VJOURNAL

Properties suffixed by "*", described in rfc7986 "New Properties for iCalendar", may NOT be supported by all calendaring software.

Components and properties suffixed by "*2", described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

journalc = "BEGIN" ":" "VJOURNAL" CRLF

jourprop *participantc*2 *locationc*2 *resoucec*2

"END" ":" "VJOURNAL" CRLF

jourprop = *(

OPTIONAL, MUST NOT occur more than once

class / color* / created / description / dtstart / dtstamp /

last-mod / organizer / recurid /

seq / status / summary / uid / url /

OPTIONAL, MAY occur more than once

attach / attendee / categories / comment / contact /

image* / exdate / exrule / related / rdate /

rrule / rstatus / styleddescription*2 / sdataprop*2 / x-prop

)

[index] [top] [up]

2.5 VFREEBUSY

Components and properties suffixed by "*2", described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

"BEGIN" ":" "VFREEBUSY" CRLF

fbprop *participantc*2 *locationc*2 *resoucec*2

"END" ":" "VFREEBUSY" CRLF

fbprop = *(

OPTIONAL, MUST NOT occur more than once

contact / dtstart / dtend / duration /

dtstamp / organizer / uid / url /

OPTIONAL, MAY occur more than once

attendee / comment / freebusy / rstatus / styleddescription*2 / x-prop

)

[index] [top] [up]

2.6 VALARM

The "VALARM" calendar component MUST only appear within either a VEVENT or VTODO calendar component.

Multiple mutually independent "VALARM" calendar components can be specified for a single VEVENT or VTODO calendar component.

Component and properties suffixed by "*3", described in rfc9074 "VALARM Extensions for iCalendar" may NOT be supported by all calendaring software.

"BEGIN" ":" "VALARM" CRLF

(audioprop / dispprop / emailprop / procprop) *locationc*3

"END" ":" "VALARM" CRLF

audioprop = *(

REQUIRED, but MUST NOT occur more than once

action / trigger /

"duration" and "repeat" are both optional,and MUST NOT occur more than once each,
but if one occurs, so MUST the other

duration / repeat /

OPTIONAL, MUST NOT occur more than once

attach / acknowledged*3 / proximity*3 / uid*3 /

OPTIONAL, MAY occur more than once

related*3 / styleddescription*2 / x-prop

)

dispprop = *(

REQUIRED, MUST NOT occur more than once

action / description / trigger /

"duration" and "repeat" are both optional,and MUST NOT occur more than once each,
but if one occurs, so MUST the other

duration / repeat /

OPTIONAL, but MUST NOT occur more than once

acknowledged*3 / proximity*3' / uid /

OPTIONAL, MAY occur more than once

related*3 / styleddescription*2 / x-prop

)

emailprop = *(

REQUIRED, MUST NOT occur more than once

action / description / trigger / summary /

REQUIRED, MAY occur more than once

attendee /

"duration" and "repeat" are both optional, and MUST NOT occur more than once each,
but if one occurs, so MUST the other

duration / repeat /

OPTIONAL, but MUST NOT occur more than once

acknowledged*3 / proximity*3' / related*3 / uid /

OPTIONAL, MAY occur more than once

attach / related / x-prop

)

procprop (defined in rfc2445 but excluded in rfc5545) = *(

REQUIRED, MUST NOT occur more than once

action / attach / trigger /

"duration" and "repeat" are both optional, and MUST NOT occur more than once each,
but if one occurs, so MUST the other

duration / repeat /

OPTIONAL and MUST NOT occur more than once

acknowledged*3 / description / proximity*3 / uid /

OPTIONAL, MAY occur more than once

related*3 / styleddescription*2 / x-prop

)

[index] [top] [up]

2.7 PARTICIPANT

...can be specified multiple times in a VEVENT, VTODO, VJOURNAL, or VFREEBUSY calendar component

Note, PARTICIPANT, described in rfc9073 "Event Publishing Extensions to iCalendar"
may NOT be supported by all calendaring software

"For backwards compatibility with existing clients and servers when used to schedule events and tasks, the ATTENDEE property MUST be used to specify the scheduling parameters as defined for that property."

see ATTENDEE rfc9073 note

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

"BEGIN" ":" "PARTICIPANT" CRLF

partprop *locationc *resourcec

"END" ":" "PARTICIPANT" CRLF

partprop = *(

REQUIRED, but MUST NOT occur more than once

participanttype / uid /

OPTIONAL, MUST NOT occur more than once

calendaraddress / created / description / dtstamp / geo / last-mod /

priority / seq / status / summary / url /

OPTIONAL and MAY occur more than once

attach / categories / comment / contact / location / rstatus /

related / resources / styleddescription / sdataprop / x-prop

)

[index] [top] [up]

2.8 VLOCATION

can be specified multiple times in a VEVENT, VTODO, VJOURNAL, VFREEBUSY or PARTICIPANT calendar component

Note, VLOCATION, described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

See LOCATION rfc9073 note

The UID property is automatically created by iCalcreator at instance creation.

"BEGIN" ":" "VLOCATION" CRLF

locprop

"END" ":" "VLOCATION" CRLF

locprop = *(

REQUIRED, but MUST NOT occur more than once

uid /

OPTIONAL, MUST NOT occur more than once

description / geo / loctype / name /

OPTIONAL and MAY occur more than once

sdataprop / x-prop

)

[index] [top] [up]

2.9 VRESOURCE

can be specified multiple times in a VEVENT, VTODO, VJOURNAL, VFREEBUSY or PARTICIPANT calendar component

Note, VRESOURCE, described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

See RESOURCES rfc9073 note

The UID property is automatically created by iCalcreator at instance creation.

"BEGIN" ":" "VRESOURCE" CRLF

resprop

"END" ":" "VRESOURCE" CRLF

resprop = *(

REQUIRED, but MUST NOT occur more than once

uid /

OPTIONAL, MUST NOT occur more than once

description / geo / name / restype /

OPTIONAL and MAY occur more than once

sdataprop / x-prop

)

[index] [top] [up]

2.10 VAVAILABILITY

VAVAILABILITY component can be specified multiple times in a VCALENDAR

The component, as described in rfc7953 "New Properties for iCalendar", may NOT be supported by all calendaring software.

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

"BEGIN" ":" "VAVAILABILITY" CRLF

availabilityprop *availablec

"END" ":" "VAVAILABILITY" CRLF

availabilityprop = *(

REQUIRED, MUST NOT occur more than once

dtstamp / uid

OPTIONAL, MUST NOT occur more than once

busytype / class / created / description / dtstart / last-mod /

location / organizer / priority / seq / summary / url /

either "dtend" or "duration" may appear in a "availabilityprop",
but "dtend" and "duration" MUST NOT occur in the same "availabilityprop"
duration" MUST NOT be present if "dtstart" is not present

dtend / duration /

OPTIONAL and MAY occur more than once

categories / comment / contact / x-prop

)

[index] [top] [up]

2.11 AVAILABLE

AVAILABLE component can be specified multiple times in a VAVAILABILITY

Component, as described in rfc7953 "New Properties for iCalendar", may NOT be supported by all calendaring software.

The DTSTAMP and UID properties are automatically created by iCalcreator at instance creation.

"BEGIN" ":" "AVAILABLE" CRLF

availableprop

"END" ":" "AVAILABLE" CRLF

availableprop = *(

REQUIRED, MUST NOT occur more than once

dtstamp / dtstart / uid

either "dtend" or "duration" may appear in a "availableprop",
but "dtend" and "duration" MUST NOT occur in the same "availableprop"

dtend / duration /

OPTIONAL, MUST NOT occur more than once

created / description / last-mod / location / recurid / rrule / summary /

OPTIONAL and MAY occur more than once

categories / comment / contact / exdate / rdate / x-prop

)

[index] [top] [up]

2.14 VTIMEZONE

Properties suffixed by "*4", described in rfc7808 "Time Zone Data Distribution Service" may NOT be supported by all calendaring software.

"BEGIN" ":" "VTIMEZONE" CRLF

*(

REQUIRED, but MUST NOT occur more than once

tzid /

OPTIONAL, but MUST NOT occur more than once

last-mod / tzuntil*4 / tzurl

OPTIONAL, but MAY occur more than once

tz-alias-of*4 /

one of "standardc" or "daylightc" MUST occur and each MAY occur more than once.

standardc / daylightc /

optional, MAY occur more than once

x-prop

)

"END" ":" "VTIMEZONE" CRLF

standardc = "BEGIN" ":" "STANDARD" CRLF

tzprop

"END" ":" "STANDARD" CRLF

daylightc = "BEGIN" ":" "DAYLIGHT" CRLF

tzprop

"END" ":" "DAYLIGHT" CRLF

tzprop = *(

REQUIRED, MUST NOT occur more than once

dtstart / tzoffsetto / tzoffsetfrom /

OPTIONAL, MAY occur more than once

comment / rdate / rrule / tzname / x-prop

)

[index] [top] [up]

3 methods

3.1 Vcalendar methods

3.1.1 Constructors

3.1.1.1 Vcalendar

Create a new VCALENDAR object instance.

Constructor

Throws InvalidArgumentException on (set)config error.

Format

Vcalendar::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ]; $vcalendar = new Vcalendar( $config );

The calendar PRODID property (based on the configuration unique_id) and the calendar/component UID property are AUTOMATICALLY generated in iCalcreator at instance creation.

Example 2

use Kigkonsult\Icalcreator\Vcalendar; $tz = "Europe/Stockholm" $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vcalendar->setXProp( Vcalendar::X_WR_TIMEZONE, $tz ); // insert components or parse an iCal string calendar (and edit components) .. .

Some calendar software may also require calendar property X-WR-TIMEZONE and vtimezone component with property X-LIC-LOCATION, review Vcalendar populate or Util/VtimezonePopulateFactory::process methods.

factory

Create a new Vcalendar object instance using a factory-method.

Throws InvalidArgumentException on (set)config error.

Format

Vcalendar::factory( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = Vcalendar::factory( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ) ->setMethod( "PUBLIC" );


[index] [top] [up]

3.1.1.2 Vevent

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VEVENT is available.

Format 1

Create a new VEVENT object instance using a VCALENDAR component factory-method.

Throws InvalidArgumentException on (set)config error.

Vcalendar::newVevent( [ dtstart [, dtend [, duration [, summary ]]]] )

dtstart = property DTSTART string|DateTimeInterface value dtend = property DTEND string|DateTimeInterface value * duration = property DURATION string|DateInterval value * summary = property SUMMARY string value *) dtend and duration MUST NOT occur in the same VEVENT

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vevent = $vcalendar->newVevent( $dtStart ); .. .

Format 2

Create a new VEVENT object instance using a VEVENT factory-method.

Throws InvalidArgumentException on (set)config error.

Vevent::factory( [ config [, dtstart [, dtend [, duration [, summary ]]]]] )

config = array, review configuration options. dtstart = property DTSTART string|DateTimeInterface value dtend = property DTEND string|DateTimeInterface value * duration = property DURATION string|DateInterval value * summary = property SUMMARY string value *) dtend and duration MUST NOT occur in the same VEVENT

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vevent = Vevent::factory( null, $dtStart ); .. . $vcalendar->setComponent( $vevent );

Format 3

Create a new VEVENT object instance.

Throws InvalidArgumentException on (set)config error.

Vevent::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $config = $vcalendar->getConfig(); $vevent = new Vevent( $config ); .. . $vcalendar->setComponent( $vevent );


[index] [top] [up]

3.1.1.3 Vtodo

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VTODO is available.

Format 1

Create a new VTODO object instance using a VCALENDAR component factory-method.

Throws InvalidArgumentException on (set)config error.

Vcalendar::newVtodo( [ dtstart [, due [, duration [, summary ]]]] )

dtstart = property DTSTART string|DateTimeInterface value due = property DUE string|DateTimeInterface value * duration = property DURATION string|DateInterval value * summary = property SUMMARY string value *) dtend and duration MUST NOT occur in the same VEVENT

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vtodo = $vcalendar->newVtodo( $dtStart ); .. .

Format 2

Create a new VTODO object instance using VTODO factory-method.

Throws InvalidArgumentException on (set)config error.

Vcalendar::newVtodo( [ config [, dtstart [, due [, duration [, summary ]]]]] )

config = array, review configuration options. dtstart = property DTSTART string|DateTimeInterface value due = property DUE string|DateTimeInterface value * duration = property DURATION string|DateInterval value * summary = property SUMMARY string value *) dtend and duration MUST NOT occur in the same VEVENT

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vtodo = Vtodo::factory( null, $dtStart ); .. . $vcalendar->setComponent( $vtodo );

Format 3

Create a new VTODO object instance.

Throws InvalidArgumentException on (set)config error.

Vtodo::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vtodo; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $config = $vcalendar->getConfig(); $vtodo = new Vtodo( $config ); .. . $vcalendar->setComponent( $vtodo );


[index] [top] [up]

3.1.1.4 Vjournal

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VJOURNAL is available.

Format 1

Create a new VJOURNAL object instance using a VCALENDAR component factory-method.

Vcalendar::newVjournal( [ dtstart [, summary ]] )

dtstart = property DTSTART string|DateTimeInterface value summary = property SUMMARY string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vjournal = $vcalendar->newVjournal( $dtStart ); .. .

Format 2

Create a new VJOURNAL object instance using a VJOURNAL factory-method.

Vjournal::factory( [ config [, dtstart [, summary ]]] )

config = array, review configuration options. dtstart = property DTSTART string|DateTimeInterface value summary = property SUMMARY string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vjournal = Vjournal::factory( null, $dtStart ); .. . $vcalendar->setComponent( $vjournal );

Format 3

Create a new VJOURNAL object instance.

Throws InvalidArgumentException on (set)config error.

Vtodo::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vjournal; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $config = $vcalendar->getConfig(); $vjournal = new Vjournal( $config ); .. . $vcalendar->setComponent( $vjournal );


[index] [top] [up]

3.1.1.5 Vfreebusy

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VFREEBUSY is available.

Format 1

Create a new VFREEBUSY object instance using a VCALENDAR component factory-method.

Throws InvalidArgumentException on (set)config error.

Vcalendar::newVfreebuy( [ attendee [, dtstart [, dtend ]]] )

attendee = property ATTENDEE string value dtstart = property DTSTART string|DateTimeInterface value dtend = property DTEND string|DateTimeInterface value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vtodo = $vcalendar->newVfreebusy( $attendee, $dtStart, $dtend ); .. .

Format 2

Create a new VFREEBUSY object instance using a factory-method.

Throws InvalidArgumentException on (set)config error.

Vcalendar::newVfreebuy( [ config [, attendee [, dtstart [, dtend ]]]] )

config = array, review configuration options. attendee = property ATTENDEE string value dtstart = property DTSTART string|DateTimeInterface value dtend = property DTEND string|DateTimeInterface value

Example

use Kigkonsult\Icalcreator\Vcalendar; $config =[ Vcalendar::UNIQUE_ID => "kigkonsult.se" ]; $vcalendar = new Vcalendar( $config ); .. . $vtodo = Vfreebusy::factory( $config, $attendee, $dtStart, $dtend ); .. . $vcalendar->setComponent( $vfreebusy );

Format 3

Create a new VTODO object instance.

Throws InvalidArgumentException on (set)config error.

Vfreebusy::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vfreebusy; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $config = $vcalendar->getConfig(); $vfreebusy = new Vfreebusy( $config ); .. . $vcalendar->setComponent( $vfreebusy );


[index] [top] [up]

3.1.1.6 Valarm

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VALARM is available.

Format 1

Create a new VALARM object instance using a Vcalendar component factory-method. The VALARM calendar component MUST only appear (one or more) in either a VEVENT or VTODO calendar component.

calendarComponent::newValarm( [ action [, trigger ]] )

action = property ACTION string value trigger = property TRIGGER string|DateInterval|DateTimeInterface value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); .. . $vevent = $vcalendar->newVevent( $eventDtstart ); .. . $valarm = $vevent->newValarm( Vcalendar::DISPLAY, $veventAlarmDtstart ); .. . $vtodo = $vcalendar->newVtodo( $todoDtstart ); .. . $valarm = $vtodo->newValarm( Vcalendar::AUDIO, $totoAlarmDtstart ); .. .

Format 2

Create a new VALARM object instance. using a factory-method.

Throws InvalidArgumentException on (set)config error.

Valarm::factory( [ config [, action [, trigger ]]] )

config = array, review configuration options. action = property ACTION string value trigger = property TRIGGER string|DateInterval|DateTimeInterface value

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; use Kigkonsult\Icalcreator\Valarm; $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ]: $vcalendar = new Vcalendar( $config ); .. . $vevent = Vevent::factory( $config ); .. . $valarm = Valarm::factory( $config, Vcalendar::DISPLAY, $veventAlarmDtstart ); .. . $vevent->setComponent( $valarm ); $vcalendar->setComponent( $vevent );

Format 3

Create a new VALARM object instance.

Throws InvalidArgumentException on (set)config error.

Valarm::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; use Kigkonsult\Icalcreator\Valarm; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = new Vevent( $vcalendar->getConfig()); .. . $valarm = new Valarm( $vevent->getConfig()); .. . $vevent->setComponent( $valarm ); $vcalendar->setComponent( $vevent );


[index] [top] [up]

3.1.1.7 Vavailability

As described in

rfc7953 "Calendar Availability"
VAVAILABILITY may NOT be supported by all calendaring software.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VAVAILABILITY is available.

Format 1

Create a new VAVAILABILITY object instance using an VCALENDAR component factory-method.

Vcalendar::newVavailability( [ busytype [, [ dtstart [, dtend [, duration ]]]] )

busytype = property BUSYTYPE string value, dtstart = property DTSTART string|DateTimeInterface datetime value, dtend = property DTEND string|DateTimeInterface datetime value * duration = property DURATION string|DateInterval value * *) dtend and duration MUST NOT occur in the same VAVAILABILITY

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vavailability = $vcalendar->newVavailability( "BYSY", "20220101T080000", "20220101T170000" ); .. .

Format 2

Create a new VAVAILABILITY object instance using a factory-method.

Vavailability::factory( [ config [, busytype [, [ dtstart [, dtend [, duration ]]]]] )

config = array, review configuration options. busytype = property BUSYTYPE string value, dtstart = property DTSTART string|DateTimeInterface datetime value, dtend = property DTEND string|DateTimeInterface datetime value * duration = property DURATION string|DateInterval value * *) dtend and duration MUST NOT occur in the same VAVAILABILITY

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vavailability = Vavailability::factory( null, "BYSY", "20220101T080000", "20220101T170000" ); .. . $vcalendar->setComponent( $vavailability );

Format 3

Create a new VAVAILABILITY object instance.

Vavailability::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vavailability; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vavailability = new Vavailability( $vcalendar->getConfig()); .. . $vcalendar->setComponent( $vavailability );


[index] [top] [up]

3.1.1.8 Available

As described in

rfc7953 "Calendar Availability"
AVAILABLE may NOT be supported by all calendaring software.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::AVAILABLE is available.

Format 1

Create a new AVAILABLE object instance using an VAVAILABILITY component factory-method.

Vavailability::newAvailable( [ dtstart [, dtend [, duration ]]] )

dtstart = property DTSTART string|DateTimeInterface datetime value, dtend = property DTEND string|DateTimeInterface datetime value * duration = property DURATION string|DateInterval value * *) dtend and duration MUST NOT occur in the same AVAILABLE

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vavailability = $vcalendar->newVavailability(); .. . $available = $vavailability->newAvailable(); .. .

Format 2

Create a new AVAILABLE object instance using a factory-method.

Available::factory( [ config [, dtstart [, dtend [, duration ]]]] )

config = array, review configuration options. dtstart = property DTSTART string|DateTimeInterface datetime value, dtend = property DTEND string|DateTimeInterface datetime value * duration = property DURATION string|DateInterval value * *) dtend and duration MUST NOT occur in the same AVAILABLE

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vavailability = Vavailability::factory(); .. . $available = Available::factory(); .. . $vavailability->setComponent( $available ); .. . $vcalendar->setComponent( $vavailability );

Format 3

Create a new AVAILABLE object instance.

Available::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vavailability; use Kigkonsult\Icalcreator\Available; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vavailability = new Vavailability( $vcalendar->getConfig()); .. . $available = new Available( $vavailability->getConfig()); .. . $vavailability->setComponent( $available ); .. . $vcalendar->setComponent( $vavailability );


[index] [top] [up]

3.1.1.9 Participant

Note, PARTICIPANT, described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::PARTICIPANT is available.

Format 1

Create a new PARTICIPANT object instance using a VEVENT / VTODO / VJOURNAL / VFREEBUSY component factory-method, used below as "Component".

Component::newParticipant( [ participanttype [, calendaraddress ]] )

participanttype = property PARTICIPANT-TYPE string value, calendaraddress = property CALENDAR-ADDRESS string CAL-ADDRESS (uri) value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent(); .. . $participant = $vevent->newParticipant( Vcalendar::SPONSOR, "hq@acme.com"); .. .

Format 2

Create a new PARTICIPANT object instance using a factory-method.

Participant::factory( [ config [, participanttype [, calendaraddress ]]] )

config = array, review configuration options. participanttype = property PARTICIPANT-TYPE string value, calendaraddress = property CALENDAR-ADDRESS string CAL-ADDRESS (uri) value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent(); .. . $participant = Participant::factory( null, Vcalendar::SPONSOR, "hq@acme.com"); .. . $vevent->setComponent( $participant );

Format 3

Create a new PARTICIPANT object instance.

Participant::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; use Kigkonsult\Icalcreator\Participant; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = new Vevent( $vcalendar->getConfig()); .. . $participant = new Participant( $vevent->getConfig()); .. . $vevent->setComponent( $participant ); .. . $vcalendar->setComponent( $vevent );


[index] [top] [up]

3.1.1.10 Vlocation

Note, VLOCATION, described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VLOCATION< is available.

Format 1

Create a new VLOCATION object instance using a VEVENT / VTODO / VJOURNAL / VFREEBUSY / PARTICIPANT component factory-method, used below as "Component".

Component::newVlocation( [ locationType [, name ] ] )

locationType = property LOCATION-TYPE string value name = property NAME string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent(); .. . $vlocation = $vevent->newVlocation(); .. .

Format 2

Create a new VLOCATION object instance using a factory-method.

Vlocation:factory( [ config [, locationType [, name ]]] )

config = array, review configuration options. locationType = property LOCATION-TYPE string value name = property NAME string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent(); .. . $vlocation = Vlocation::factory( null, $locationType , $name ); .. . $vevent->setComponent( $vlocation );

Format 3

Create a new VLOCATION object instance.

Vlocation::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; use Kigkonsult\Icalcreator\Vlocation; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = new Vevent( $vcalendar->getConfig()); .. . $vlocation = new Vlocation( $vevent->getConfig()); .. . $vevent->setComponent( $vlocation ); .. . $vcalendar->setComponent( $vevent );


[index] [top] [up]

3.1.1.11 Vresource

Note, VRESOURCE, described in rfc9073 "Event Publishing Extensions to iCalendar" may NOT be supported by all calendaring software.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VRESOURCE is available.

Format 1

Create a new VRESOURCE object instance using a VEVENT / VTODO / VJOURNAL / VFREEBUSY / PARTICIPANT component factory-method, used below as "Component".

Component::newVresource( [ resourceType [, name ] ] )

resourceType = property RESOURCE-TYPE string value name = property NAME string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent(); .. . $vresource = $vevent->newVresource(); .. .

Format 2

Create a new VRESOURCE object instance using a factory-method.

Vresource::factory( [ config [, resourceType [, name ]]] )

config = array, review configuration options. resourceType = property RESOURCE-TYPE string value name = property NAME string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent(); .. . $vresource = Vresource:factory( null, $resourceType, $name ); .. . $vevent->setComponent( $vresource );

Format 3

Create a new VRESOURCE object instance.

Vlocation::__construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; use Kigkonsult\Icalcreator\Vresource; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = new Vevent( $vcalendar->getConfig()); .. . $vresource = new Vresource( $vevent->getConfig()); .. . $vevent->setComponent( $vresource ); .. . $vcalendar->setComponent( $vevent );


[index] [top] [up]

3.1.1.12 Vtimezone

The vtimezone component describe, at a minimum, the base offset from UTC for the time zone. For dates with UTC DATE-TIME, read this!

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VTIMEZONE is available.

You can use Vtimezone populate to ease up including Vtimezone(s) in a calendar.

Format 1

Create a new VTIMEZONE object instance using an VCALENDAR component factory-method.

Vcalendar::newVtimezone( [ tzid ] )

tzid = property TZID string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtimezone( "Europe/Stockholm"); .. .

Format 2

Create a new VTIMEZONE object instance using a factory-method.

Vtimezone::factory( [ config [, tzid ]] )

config = array, review configuration options. tzid = property TZID string value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = Vtimezone::factory( null, "Europe/Stockholm" ); .. . $vcalendar->setComponent( $vtimezone );

Format 3

Create a new VTIMEZONE object instance.

Vtimezone::_construct( [ config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vtimezone; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = new Vtimezone( $vcalendar->getConfig()); .. . $vcalendar->setComponent( $vtimezone ); .. .


[index] [top] [up]

3.1.1.13 Standard / Daylight

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::STANDARD
- Kigkonsult\Icalcreator\Vcalendar::DAYLIGHT
are available.

Format 1

Create a new VTIMEZONE STANDARD / DAYLIGHT object instance using a VTIMEZONE component factory-method.

Vtimezone::newStandard()

Vtimezone::newDaylight()

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtimezone(); .. . $standard = $vtimezone->newStandard(); .. . $daylight = $vtimezone->newDaylight(); .. .

Format 2

Create a new VTIMEZONE STANDARD object instance.

Vtimezone::__construct( "standard" [, config ] )

config = array, review configuration options.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vtimezone; use Kigkonsult\Icalcreator\Standard; use Kigkonsult\Icalcreator\Daylight; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = new Vtimezone( $vcalendar->getConfig()); .. . $standard = new Standard( $vtimezone->getConfig()); .. . $vtimezone->setComponent( $standard ); $daylight = new Daylight( $vtimezone->getConfig()); .. . $vtimezone->setComponent( $daylight ); $vcalendar->setComponent( $vtimezone );


[index] [top] [up]

3.1.2 Vcalendar property methods

3.1.2.1 CALSCALE

This property defines the calendar scale used for the calendar information specified in the iCalendar object.

The default (pre-set) value is "GREGORIAN".

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::CALSCALE is available.

Create CALSCALE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

Vcalendar::createCalscale()

Example

$str = $vcalendar->createCalscale();

Delete CALSCALE

Remove CALSCALE from calendar.

Format

Vcalendar::deleteCalscale()

Example

$vcalendar->deleteCalscale();

Get Calscale

If set, returns property value, otherwise bool false.

Format

Vcalendar::getCalscale()

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $calscale = $vcalendar->getCalscale();

Set CALSCALE

Set property value. The default value is "GREGORIAN", it is pre-set.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

Vcalendar::setCalscale()

value = (string) calscale value

Example

use Kigkonsult\Icalcreator\Vcalendar; $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ]; $vcalendar = new Vcalendar( $config ); $vcalendar->setCalscale( "GREGORIAN" );


[index] [top] [up]

3.1.2.2 METHOD

This property defines the iCalendar object method associated with the calendar object.

METHOD property (value PUBLISH etc.) may be required when importing iCal formatted information into some calendaring software (MS etc.), as well as x-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE" and the (automatically created) DTSTAMP and UID properties.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::METHOD
- Kigkonsult\Icalcreator\Vcalendar::PUBLISH
- Kigkonsult\Icalcreator\Vcalendar::REQUEST
- Kigkonsult\Icalcreator\Vcalendar::REPLY
- Kigkonsult\Icalcreator\Vcalendar::ADD
- Kigkonsult\Icalcreator\Vcalendar::CANCEL
- Kigkonsult\Icalcreator\Vcalendar::REFRESH
- Kigkonsult\Icalcreator\Vcalendar::COUNTER
- Kigkonsult\Icalcreator\Vcalendar::DECLINECOUNTER
are available.

Create METHOD

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

Vcalendar::createMethod()

Example

$str = $vcalendar->createMethod();

Delete METHOD

Remove METHOD from calendar.

Format

Vcalendar::deleteMethod()

Example

$vcalendar->deleteMethod();

Get METHOD

If set, returns property value, otherwise bool false.

Format

Vcalendar::getMethod();

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vcalendar->parse(); $method = $vcalendar->getMethod();

Set METHOD

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

Vcalendar::setMethod( value )

value = (string) method value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vcalendar->setMethod( Vcalendar::PUBLISH );


[index] [top] [up]

3.1.2.3 VERSION

This property specifies the identifier corresponding to the version number of the iCalendar specification. This property is always placed first in the formatted calendar.

Version is AUTO generated as "2.0" at calendar creation.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::VERSION is available.

Create Version

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

Vcalendar::createVersion()

Example

$str = $vcalendar->createVersion();

Get Version

Fetch property value.

Format

Vcalendar::getVersion()

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $version = $vcalendar->getVersion()

Set Version

Set property value. Only version 2.0 valid, version is AUTO generated at calendar creation.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

Vcalendar::setVersion( version )

version = (string) iCal version

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ] ); $vcalendar->setVersion("2.0" );


[index] [top] [up]

3.1.3 Vcalendar component object methods

3.1.3.1 deleteComponent

Remove component from the Vcalendar instance.

Bool false is returned if no component exists or at end-of-components invoking the method consecutive.

format 1

Remove component with order number (1st=1, 2nd=2).

Vcalendar::deleteComponent( orderNumber )

orderNumber = (int) order number

format 2

Remove component with component type (e.g. "vevent") and order 1 alt. suborder number.

Vcalendar::deleteComponent( componentType [, componentSuborderNumber])

componentType = (string) component type componentSuborderNumber = (int) order number

format 3

Remove component with UID. N.B UID is NOT set for ALARM / TIMEZONE components.

Vcalendar::deleteComponent( UID )

Example 1

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $vcalendar->deleteComponent( 1 ); $vcalendar->deleteComponent( Kigkonsult\Icalcreator\Vcalendar::VTODO, 2 ); $vcalendar->deleteComponent( "20070803T194810CEST-0123U3PXiX@kigkonsult.se");

Example 2

Deleting all components, using format 2 without order number.

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); while( $vcalendar->deleteComponent( Vcalendar::VEVENT)) { continue; } $vtodo = $vcalendar->getComponent( Vcalendar::VTODO ); while( $vtodo->deleteComponent( Vcalendar::VALARM)) { continue; }


[index] [top] [up]

3.1.3.2 getComponent

Get (next) component from the Vcalendar instance.

Bool false is returned if no component exists or at end-of-components invoking the method consecutive.

format 1

Get next component, until end-of-components.

Vcalendar::getComponent()

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); while( $comp = $vcalendar->getComponent()) { .. . }

format 2

Get specific component with order number (1st=1, 2nd=2).

Vcalendar::getComponent( orderNumber )

orderNumber = (int) order number

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); if( $comp = $vcalendar->getComponent( 1 )) { .. . }

format 3

Get (first/next) component with component type (until end-of-components) alt. get specific component with component type and suborder number (1st=1, 2nd=2).

Vcalendar::getComponent( componentType [, componentSuborderNumber])

componentType = (string) component type componentSuborderNumber = (int) order number

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); if( $comp = $vcalendar->getComponent( Kigkonsult\Icalcreator\Vcalendar::VTODO, 2 )) { .. . }

format 4

Get (first/next) component with UID as key. (UID is NOT set for ALARM / TIMEZONE components.) May be used when trying to find (base) component and corresponding RECURRENCE-ID components.

Vcalendar::getComponent( UID )

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $uid = "20070803T194810CEST-0123U3PXiX@kigkonsult.se"; if( $comp = $vcalendar->getComponent( $uid )) { .. . }

format 5

Get (first/next) component based on specific property contents:

Note, to ease up usage, you will find convenient constants for component names, properties, config keys etc in (src/)IcalInterface.

Supported Descriptive Component Properties
CATEGORIES
LOCATION
PRIORITY
RESOURCES
STATUS
SUMMARY
Date and Time Component Properties
COMPLETED
DTEND
DUE
DTSTART
SupportedRelationship Component Properties
ATTENDEE *1
CONTACT
ORGANIZER *1
RECURRENCE-ID
RELATED-TO
URL
UID
Change Management Component Properties
CREATED
DTSTAMP
LAST-MODIFIED
*1
ATTENDEE and ORGANIZER search values must be prefixed by protocol ex. "MAILTO:chair@ical.net".

For the property "SUMMARY" ,if a search value (any case) exists within property value, a hit exists. For the other, non-date, properties an exact (strict case) match is required.

To select components based on property values, use selectComponents (Format 2).

Vcalendar::getComponent( search )

search = (array) ( *[ propertyName => uniqueValue ]), multiple array elements are combined by "OR" propertyName = (string) property name, above propertyData = (string) unique property value (strict case), date format "YYYYMMDD" (if any side is DATE, only dates are used), datetime format "YYYYMMDDTHHMMSS"

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); while( $comp = $vcalendar->getComponent( [ Vcalendar::RESOURCES => "PC" ]) { .. . }


[index] [top] [up]

3.1.3.3 getComponents

Return (array) Vcalendar instance components.

format

Vcalendar::getComponents( [ compType ] )

compType : (string) component type

Example

Return all Vevents

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); foreach( $vcalendar->getComponents( Vcalendar::VEVENT ) as $component ) { .. . }


[index] [top] [up]

3.1.3.4 replaceComponent

Replace calendar component in vcalendar based on component property UID (EVENT / VTODO / VJOURNAL / VFREEBUSY). If not found, inserted last in component chain.

In case of multiple components sharing the same UID (ex. a RECURRENCE-ID property altering a recurrence pattern), the first found is replaced and it may lead to unpredictable result, to use with care.

For a VTIMEZONE component, a TZID match is required.

A successfull replace returns bool true otherwise bool false.

Throws InvalidArgumentException/UnexpectedValueException on unknown or not-found component error.

Format

Vcalendar::replaceComponent( component )

component = (object) component instance

Example

$vcalendar->replaceComponent( $component );


[index] [top] [up]

3.1.3.5 selectComponents

Format 1

Selects EVENT / VTODO / VJOURNAL / VFREEBUSY components from the Vcalendar instance on based on dates (notice date restraints), based on the initial DTSTART property along with the RRULE, RDATE, EXDATE and EXRULE properties in the component and UID-matched component(s) with RECURRENCE-ID.

Requirement:

Limitations:

Returns an array with components (events) or bool falses if no found component(s) exists. Opt. replaced (RECURRENCE-ID) components has (if missing) updated SUMMARY, DESCRIPTION and COMMENTs properties.

Added X-properties in recurrent instances of a calendar component:

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::X_CURRENT_DTSTART,
- Kigkonsult\Icalcreator\Vcalendar::X_CURRENT_DTEND,
- Kigkonsult\Icalcreator\Vcalendar::X_CURRENT_DUE,
- Kigkonsult\Icalcreator\Vcalendar::X_RECURRENCE,
- Kigkonsult\Icalcreator\Vcalendar::X_OCCURENCE
are available.

Throws InvalidArgumentException on argument error, Exception on DateTime/DateInterval error.

The following recur rule sets has improved base selects :

FREQ=DAILY
BYDAY opt, only fixed weekdays ex. "TH", not "-1TH"
BYMONTH opt
BYMONTHDAY opt
BYSETPOS, only if BYMONTH or BYMONTHDAY is set
FREQ=WEEKLY
1
2
FREQ=MONTHLY
1
2
FREQ=YEARLY
1
2

Vcalendar::selectComponents([ startYear, startMonth, startDay [, endYear, endMonth, endDay [, cType [, flat [, any [, split]]]]]])

startYear : (int) start year (4*digit), default current year (object) DateTimeInterface instance, start date* startMonth : (int) start month (1-2*digit), default current month (object) DateTimeInterface instance, end date* startDay : (int) start day (1-2*digit), default current day endYear : (int) end year (4*digit), default startYear endMonth : (int) end month (1-2*digit), default startMonth endDay : (int) end day (1-2*digit), default startDay cType : (mixed) calendar component type(-s), (string/array) ("vevent", "vtodo", "vjournal", "vfreebusy") (bool) false (default) => all flat : (bool) true => output : array[] (ignores split) component where recurrence pattern exists within period false (default) => output : array[Year][Month][Day][] any : (bool) true (default) => select components with recurrence within period false => only components that starts (DTSTART) within period split : (bool) true (default) => one component copy for every day it occurs within the period false => one occurrence of component in output array, start date/recurrence (start) date *When using DateTimeInterface instances, other start/end arguments are ignored. valid flat any split combinations (defaults in upper case) 1 false true true 2 false true false 3 false false [false] (split set to false if flat=false and any=false) 4 true true [false] (split set to false if flat=true) 5 true false [false] (split set to false if flat=true) If flat is set to false, output array is sorted in 'Y-m-d h-i-s' asc. order.

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $events_arr = $vcalendar->selectComponents( 2007, 11, 1, 2007, 11, 30, Vcalendar::VEVENT ); // select all events occurring 1-30 nov. 2007 foreach( $events_arr as $year => $year_arr ) { foreach( $year_arr as $month => $month_arr ) { foreach( $month_arr as $day => $day_arr ) { foreach( $day_arr as $event ) { $currddate = $event->getDtstart(); // if member of a recurrence set // X-prop " x-current-dtstart" returns // <(string) date("Y-m-d [H:i:s][timezone/UTC offset]")> $startDate = $event->getDtstart(; $summary = $event->getSummary(); $description = $event->getDescription(); .. .

format 2

Using this format, the Vcalendar method selects components based on specific property value(-s).

Supported Descriptive Component Properties
CATEGORIES
LOCATION
PRIORITY
RESOURCES
STATUS
SUMMARY
Supported Relationship Component Properties
ATTENDEE *1
CONTACT
ORGANIZER *1
RELATED-TO
URL
UID
*1
ATTENDEE and ORGANIZER search values must be prefixed by (upper case) protocol like "MAILTO:chair@ical.net".

Note, to ease up usage, you will find convenient constants for component names, properties, config keys etc in (src/)IcalInterface.

For the property SUMMARY, if a search value (any case) exists within property value, a hit is found. For the other properties an exact (strict case) match is required. Multiple search properties may coexist.

To retrieve specific Vcalendar instance property values, searching ALL components, Vcalendar::getProperty() may work.

To get components based on property values, use getComponent (Format 5).

Vcalendar::selectComponents( searchArray )

Outputs an array of matched (unique) components in UID order.

searchArray : (array) *( propertyName => propertyValue ) propertyName : (string) above (any case) propertyValue : (string) value / (array) ( *[ (string) value] )

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $searchArray = [ Vcalendar::PRIORITY => [ 1, 2, 3, 4 ]]; $highPrioArr = $vcalendar->selectComponents( $searchArray ); // select all components with PRIORITY set to high (1-4) if( ! empty( $highPrioArr )) { $highPrioCal = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $highPrioCal->setXProp( Vcalendar::X_WR_CALDESC, "High priority events" ); foreach( $highPrioArr as $highPrioComponent ) { $highPrioCal->setComponent( $highPrioComponent ); } $highPrioCal->returnCalendar(); } // end if exit;


[index] [top] [up]

3.1.3.6 setComponent

Replace or update component in the Vcalendar instance. Also add a calendar component to the Vcalendar instance when calendar component is created with the procedural (non-factory) method, see example VEVENT, format 2.

A successful update returns true.

The method throws InvalidArgumentException on unknown component.

format 1

Insert last in component chain.

Vcalendar::setComponent( component ) Vcalendar::addComponent( component ) // alias

component = (object) Vcalendar component instance

addComponent, may be removed in future versions.

format 2

Insert/replace component with order number (1st=1, 2nd=2). If replace and orderNumber is not found, component is inserted last in chain.

Vcalendar::setComponent( component, orderNumber )

component = (object) Vcalendar component instance int = (int) order numder

format 3

Replace component with component type and 1st alt. component order number. If orderNumber is not found, component is inserted last in chain.

Vcalendar::setComponent( component, componentType [, componentSuborderNo])

component = (object) Vcalendar component instance componentType = (string) component type componentSuborderNo = (int) component Suborder Number

format 4

Replace component with UID. N.B UID is NOT set for ALARM / TIMEZONE components. If UID is not found, component is inserted last in chain.

As described in rfc9074 "VALARM Extensions for iCalendar", ALARM may have UID, may NOT be supported by all calendaring software.

Vcalendar::setComponent( component, UID )

component = (object) Vcalendar component instance

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $vevent = vcalendar->getComponent( 1 ); // fetch first EVENT $vevent->setDtstart( new DateTime( "2006-12-24 19:30:00" ) ); // update DTSTART property $vcalendar->setComponent( $vevent, 1 ); // replace first component


[index] [top] [up]

3.1.4 Vcalendar calendar methods

3.1.4.1 parse and merge

Parse string calendar content (or iCal file(-s)) into a single Vcalendar instance (components, properties and parameters), including multiple vcalendars (within a single iCal calendar) parse, e.g. Oracle Calendar exports.

If missing, component property UID is created when parsing.

Minor errors like non-standard line-endings, initial and trailing empty lines as well as files without proper end line(-s) (i.e. missing component end and/or "END:CALENDAR" iCal directives) are managed.

Throws InvalidArgumentException on argument error, UnexpectedValueException on parse error.
Note, parsing an empty calendar (ie without EVENTs etc) will NOT lead to error. To count components, before and after parse, use countComponents method.

Non-standard iCal properties (except the X-properties) are ignored.

For parsing an internet URL resource, UrlRsrc can be used.

Format

The method returns the class instance (static).

Vcalendar::parse( [ textToParse ] )

textToParse = (string) calendarContent ex. result from - file_get_contents( "filename") (array) calendarContent ex. result from - file( "filename", FILE_IGNORE_NEW_LINES )

parse example 1

use Kigkonsult\Icalcreator\Vcalendar; // set Your unique id, // site info for the Vcalendar PRODID property $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ] ); // get iCal contents from file $iCalContent = file_get_contents( "calendar.ics" ); // parse iCal contents $vcalendar->parse( $iCalContent );

parse example 2

PHP file_get_contents may work on external resources.

use Kigkonsult\Icalcreator\Vcalendar; // set Your unique id, // site info for the Vcalendar PRODID property $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); // get iCal contents from external resource $iCalContent = file_get_contents( "https://www.ical.net/calendars/calendar.ics" ); // parse iCal contents $vcalendar->parse( $iCalContent );

parse example 3

Here using UrlRsrc to download an internet (URL) resource.

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Http\UrlRsrc; // set Your unique id, // site info for the Vcalendar PRODID property $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); // get iCal contents from external resource $iCalContent = UrlRsrc::getContent( "https://www.ical.net/calendars/calendar.ics" ); // parse iCal contents $vcalendar->parse( $iCalContent );

parse example 4

Parse an array with iCal formatted rows.

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $str = [ "BEGIN:VCALENDAR", "PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.41.70//", "VERSION:2.0", "BEGIN:VEVENT", "DTSTART:20101224T190000Z", "DTEND:20101224T200000Z", "DTSTAMP:20101020T103827Z", "UID:20101020T113827-1234GkdhFR@test.org", "DESCRIPTION:example", "END:VEVENT", "END:VCALENDAR" ]; $vcalendar->parse( $str );

merge example

Parse two iCal files into one.

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "file1.ics" ); $vcalendar->parse( $iCalContent ); $iCalContent = file_get_contents( "file2.ics" ); $vcalendar->parse( $iCalContent ); file_put_contents( "icalmerge.ics", $vcalendar->createCalendar(), LOCK_EX );


[index] [top] [up]

3.1.4.2 createCalendar

Generate and return (string) calendar.

Format

Vcalendar::createCalendar()

Example

$str = $vcalendar->createCalendar(); echo $str;


[index] [top] [up]

3.1.4.3 returnCalendar

Redirect the Vcalendar instance content to user browser. Filename, addressed to browser, is automatically generated if missing or not set, the filename will look like it is set using

$filename = date( "YmdHis" ).".ics"

The method do not stop PHP script (exit), returns (bool) true on success.

Format

Vcalendar::returnCalendar( [ utf8Encode [, gzip [, cdType [, fileName ]]]] )

utf8Encode = (bool) true: utf8 encoded output, false: (default) no encoding gzip = (bool) true: gzip compressed output Header "Content-Length" only sent when gzip=true false: (default) no compressing cdType = (bool) true: (default) Content-Disposition: attachment false: Content-Disposition: inline fileName = (string) returned file Name

Example 1

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vevent = $vcalendar->newVevent() ->setDtstart( new DateTime( "2007-04-01 19:00:00", new DateTimezone( "Europe/Stockholm" ) ) ) ->setDuration( new DateInterval( "PT1H" )) ->setLocation( "Central Plaza" ) ->setSummary( "PHP summit" ); $vcalendar->returnCalendar(); exit;

Example 2

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $utf8Encode = true; if( isset( $_SERVER["HTTP_ACCEPT_ENCODING"] ) && ( false !== strpos( strtolower( $_SERVER["HTTP_ACCEPT_ENCODING"] ), "gzip" ))) { $gzip = true; } else { $gzip = false; } $vcalendar->returnCalendar( $utf8Encode, $gzip ); exit;


[index] [top] [up]

3.1.4.4 sort

Format 1

Sort created/parsed calendar components on the following (prioritized) keys:
1 - X-CURRENT-DTSTART - X-CURRENT-DTEND/X-CURRENT-DUE
    (if created in Vcalendar method selectComponents)
1 - DTSTART + DTEND alt. DURATION (where exists)
1 - DTSTART + DUE alt. DURATION (where exists)
1 - DTSTART (if exists)
2 - CREATED / DTSTAMP
3 - UID
A date value, like "DTSTART;VALUE=DATE:20120717", are sorted before a datetime value.
VTIMEZONE component(-s) is always placed first (ordered by TZID). The STANDARD / DAYLIGHT  sub-components are sorted (on asc. key DTSTART) when using createCalendar method (or returnCalendar).
Sub-components, if exists, ex.ALARM, are not sorted.

Vcalendar::sort()

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $vcalendar->sort(); $vcalendar->returnCalendar(); exit;

Format 2

Sort created/parsed calendar components based on specific property values and ascending order. If a property is not set in component, an empty sort key is used (i.e. sorted first).

Vcalendar::sort( sortArgument )

sortArgument: (string) "ATTENDEE" * / "CATEGORIES" * / "CONTACT" * / "DTSTAMP" / "LOCATION"" / "ORGANIZER" / "PRIORITY" / "RESOURCES" * / "STATUS" / "SUMMARY" / "URL" / "UID" **.

*) For a property where multiple occurrence may exist (ATTENDEE, CATEGORIES, CONTACT, RESOURCES) lowest (alphabetic) value is used as sort key.

**) For multiple components with the same UID, components with RECURRENCE-ID / SEQUENCE set are sorted first (on asc. values) and components without RECURRENCE-ID last.

Note, to ease up usage, you will find convenient constants for component names, properties, config keys etc in (src/)IcalInterface.


[index] [top] [up]

3.1.4.5 countComponents

The method returns (int) number of components in valendar. Ex. usage counting components, before and after parse.

Format

Vcalendar::countComponents()


[index] [top] [up]

3.1.4.6 iCalcreatorVersion

This static class method returns the iCalcreator class version number.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::ICALCREATOR_VERSION is available.

Format

Vcalendar::iCalcreatorVersion()


[index] [top] [up]

3.1.4.7 vtimezonePopulate

Adds populated Vtimezone to calendar with base from arguments or calendar data.

A shortcut using Util/VtimezonePopulateFactory::process method.

Return Vcalendar instance.

Throws Exception on invalid (PHP) timezone.

Format

Vcalendar::vtimezonePopulate( [ timezone [, xprops, [ start [, end ]]]] )

timezone = (string|array) valid timezone(s), acceptable by PHP DateTimeZone xprops = (array) ( *[ x-propName => value ] ), timezone non-standard properties from = DateTimeInterface | (int) timestamp, period start date* to = DateTimeInterface | (int) timestamp, period end date*


[index] [top] [up]

3.1.5 Vcalendar configuration

3.1.5.1 configuration keys

Note, to ease up usage, you will find convenient constants for config keys etc in (src/)IcalInterface.

key calendar component remark
allowEmpty * *  
Compsinfo * * getConfig only
Language * *  
setPropertyNames   * getConfig only
Unique_id * *  


[index] [top] [up]

3.1.5.2 getConfig

Vcalendar::getConfig( [ key ] )

key = (string) config key

Example 1

use Kigkonsult\Icalcreator\Vcalendar; .. . $uniqueId = $vcalendar->getConfig( Vcalendar::UNIQUE_ID ); .. .

Example 2

.. . $config = $vcalendar->getConfig(); .. .

Output= [ *( string key => mixed value ) ]


[index] [top] [up]

3.1.5.3 calendar/component initialization

Format

Create a new Vcalendar object instance.

Vcalendar::vcalendar( [ config ] )

config = (array) ( *[, key => value] ) key = (string) config key value = (mixed) config value

Example 1

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] );

Create a new calendar component.

Vcalendar::component( [ config ] )

config = (array) ( key => value *[, key => value] ) key = (string) config key value = (mixed) config value

Example 2

use Kigkonsult\Icalcreator\Vevent; $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ]; $vevent = new Vevent( $config );

Example 3

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; .. . $config = $vcalendar->getConfig(); $vevent = new Vevent( $config ); .. .

Only component relevant configuration are set. If using a component factory method, configuration is set automatically.


[index] [top] [up]

3.1.5.4 setConfig

A successful "setConfig" returns true.

Format 1

Vcalendar::setConfig( [ config ] )

config = (array) ( key => value *[, key => value] ) key = (string) config key value = (mixed) config value

Example 1

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar(); $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ]; $vcalendar->setConfig( $config );

Format 2

Vcalendar::setConfig( key, value )

key = (string) config key value = (mixed) config value

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar(); $vcalendar->setConfig( Vcalendar::UNIQUE_ID, "kigkonsult.se" );


[index] [top] [up]

3.1.5.5 Allow empty components

Allow or reject empty calendar properties. Used in createCalendar, returnCalendar or create<Property> methods, creating [RFC5545] formats.

Default true (allow).

There is a convenient config key constant available: Vcalendar::ALLOWEMPTY.


[index] [top] [up]

3.1.5.6 Component information

Only to use with Vcalendar method getConfig.

Get information about the Vcalendar instance components. Returns array with basic information about all components (in array format) within the Vcalendar instance.

Output = [ *compinfo ] compinfo = [ "ordno" => int ordno, // order number (1st=1, 2nd=2..) "type" => string type, // component type (vevent, vtodo "uid" => string uid, // component UID (not for ALARM / TIMEZONE) "props" =>, [ *( propertyName => Property count ) ], // for every set property "sub" => [ *compinfo ] ) // if subcomponents exists, an array for each subcomponent

]

There is a convenient config key constant available: Vcalendar::COMPSINFO.

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $compsinfo = $vcalendar->getConfig( Vcalendar::COMPSINFO ); foreach( $compsinfo as compinfo) { echo " order number : " . $compinfo["ordno"]."<br/>"; echo " type : " . $compinfo["type"]."<br/>"; echo " UID : " . $compinfo["uid"]."<br/>"; foreach( $compinfo["props"] as $propertyName => $propertyCount ) { echo " $propertyName = $propertyCount"; if( is_array( $compinfo["sub"] )) { foreach( $compinfo["sub"] as $subcompinfo ) { echo " order number : " . $subcompinfo["ordno"]."<br/>"; /* .. dito if subcomponents exists */ } } // end foreach } // end foreach


[index] [top] [up]

3.1.5.7 Language

Language for the Vcalendar instance and component TEXT value properties as defined in [RFC5546].

Default empty.

If NOT set in TEXT property parameters, language from component instance "setConfig( "language", ..)" method will be used, if set, otherwise language from calendar method "setConfig( "language", ..)" will be used, if set.

The calendar property PRODID is always recreated when setting (calendar) language (, note Unique_id, below).

There is a convenient config key constant available: Vcalendar::LANGUAGE.


[index] [top] [up]

3.1.5.8 setPropertyNames

Returns array of property names for all set properties in component. "X-PROP" will be used when X-properties are set.


[index] [top] [up]

3.1.5.9 Unique_id

"Unique_id" is used in calendar property PRODID, created automatically.

PRODID The identifier is RECOMMENDED to be the identical syntax to the [RFC 822] addr-spec. A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which

Default AUTOMATICALLY generated by using PHP function gethostbyname( $_SERVER["SERVER_NAME"] ) when running in a web server environment or "localhost" when using command line interface. Used when setting other (domain) name than server name.

The calendar property PRODID is always recreated when setting unique_id.

There is a convenient config key constant available: Vcalendar::UNIQUE_ID.


[index] [top] [up]

3.2 Component property methods

All iCalcreator component object property methods for get/set data.
For property format in detail, see RFC5545 "Internet Calendaring and Scheduling Core Object Specification (iCalendar)".

3.2.1 Date restraints

Notice for properties and VALUE=DATE-TIME in UTC timezone.

RFC5545: The date with UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90), the UTC designator, appended to the time value. For example, the following represents January 19, 1998, at 0700 UTC:

DTSTART:19980119T070000Z

The TZID property parameter MUST NOT be applied to DATE-TIME properties whose time values are specified in UTC timezone.

Due to a limitation in PHP date functions (on 32 bit systems), a date (ex. while setting DTSTART property) before 1970 or after GMT may force a PHP date function to generate an error or set date to "January 1 1970".

string date(time) formats: "20110625", "2011-06-25", "2011/06/26" "20110625051015", "20110625 051015" "20110625T051015", "20110625t051015" "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15" "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15" Other string formats, acceptable by PHP strtotime function, may work. Any trailing characters, will be interpreted as offset/timezone. Input string dates with timezone should have a space character between datePart and timezonePart.

If a DateTime instance used as (date[time]) property input (to recommend), opt. param TZID (timezone) should match or not be set at all.

As of 2.41.60, GitHub#103, using a non-PHP complient (ex ms) timezone in a date property string value input or in a TZID parameter may be accepted and converted to a corr. PHP timezone but may result in an unpredictable one.


[index] [top] [up]

3.2.2 Property value/params

From 2.41.36 all (but VCALENDAR CALSCALE, METHOD and VERSION) properties value and parameters are stored in a (class) Pc instance, changed from a PHP type array to an somewhat restricted ArrayObject extend class, Pc.

The component::get<Property>( true ) method output is an cloned Pc instance with property contents.
For properties where multiple occurences are allowed (ex COMMENT),
format is component::get<Property>( propOrderNo/null, true );
The current property contents will not be affected of any output Pc instance changes.
Parameter ("params") keys always in uppercase,

An pre-2.41.36 get-example, still works in post-2.41.36.

.. . $output = $event->getSummary( true ); $value = $output["value"]; $params = $output["params"]; .. .

All property set-methods (but VCALENDARs, above) accepts Pc class instance as first (and only) argument.

An post-2.41.36 get/set-example, get-methods works as in example above.

.. . $output = $event->getSummary( true ); $value = $output->value; $params = $output->params; .. . $event->setSummary( Pc::factory( $value, $params )); .. .

Pc class methods :

Pc::factory( [ value [, params ]] )
Pc class factory (static) method
value = mixed
params = array
Return class instance
Pc::getAsArray()
(Pc::getArrayCopy() alias)
return property (key/value) assoc array

Pc::isset()
Return bool true if property value property is set, i.e not null
Pc::getValue()
Return property value, false if not set
Pc::setEmpty()
Set (reset) to "empty" state (property value "" params [] )
Return class instance
Pc::setValue( [ value ] )
value = mixed
Set property value
Return class instance

Pc::getParamKeys()
Return array, property parameter keys (in uppercase)
Pc::getParams( [ pKey [, asXparamKey ] ] )
pKey = string, set to uppercase
asXparamKey = bool, opt do X-prefix pkey, default false
Return all property parameters (key/value) assoc array or single parameter key value, null if not key exists

Pc::hasParamKey( [ pKey [, pValue ] ] )
pKey = string, set to uppercase
pValue = string
Return bool true if property params has key, opt with spec. value
Pc::hasXparamKey( [ pKey [, pValue ] ] )
pKey = string, set to uppercase, x-prefixed if missing
pValue = string
Return bool true if property params has X-key, opt with spec. value
Pc::hasParamValue( [ pValue ] )
pValue = string, set to uppercase
Return bool true if property params has "VALUE" key with spec. value

Pc::removeParam( [ pKey [, pValue ] ] )
pKey = string, set to uppercase
pValue = string
Remove property parameter key, opt only with spec. value
Return class instance
removeXparam( pKey )
pKey = string, set to uppercase, x-prefixed if missing
Remove property parameter X-key
Return class instance

addParam( pKey, pValue [, overwrite = true ] )
pKey = string, set to uppercase
pValue = string
overwrite = bool, default true
Set property parameter key/value, default overwrite
Return class instance
addParamValue( pValue [, overwrite = true ] ] )
pValue = string, set to uppercase
overwrite = bool, default true
Set contents for property parameter key "VALUE", default overwrite
Return class instance
addXparam( pKey, pValue [, overwrite = true ] )
pKey = string, set to uppercase, x-prefixed if missing
pValue = string
overwrite = bool, default true
Set property parameter X-key/value, default overwrite
Return class instance
setParams( params [, overwrite = true ] ] )
params = array
overwrite = bool, default true
Set property parameter X-key/value array, default overwrite (keys set to uppercase )
Return class instance

isXprefixed( key )
static method
key = string
Return bool true if key is X-Prefixed, otherwise false
setXPrefix( key )
static method
key = string
Return (string) X-prefixed key in upper case
unsetXPrefix( key )
static method
key = string
Return string with opt. leading x-prefix removed
[index] [top] [up]

3.2.3 Parse

Parse iCal component property text from a string or an array. Each string/array row must be strict RFC5545 formatted, i.e. begin with a property name.

You can also parse complete ALARMs, all properties included, in array format and first array row as "BEGIN:VALARM", last as "END:VALARM" as well as TIMEZONE and standard/daylight subcomponents. Empty lines in a text property must be replaced by "\n".

Minor errors like non-standard line-endings, initial and trailing empty lines as well as files without proper end line(-s) (i.e. missing component end iCal directives) are managed.

Throws InvalidArgumentException, UnexpectedValueException on parse error.

Except for the X-properties, non-standard properties are ignored.

Format

calendarComponent::parse( propertyText )

propertyText = (string) [RFC5545] formatted property, (array) [RFC5545] formatted properties, property name must start string / rows(-s) // For a property array MUST all, but first row, be prefixed by space.

Example

$e = $vcalendar->newVevent(); $e->parse( "DTSTAMP:19970324T1200Z" ); $e->parse( "SEQUENCE:0" ); $e->parse( "ORGANIZER:MAILTO:jdoe@host1.com" ); $e->parse( [ "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com", "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host2.com", "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host3.com", "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host4.com" ]); $e->parse( "DTSTART:19970324T123000Z" ); $e->parse( "DTEND:19970324T210000Z" ); $e->parse( "CATEGORIES:MEETING,PROJECT" ); $e->parse( "CLASS:PUBLIC" ); $e->parse( "SUMMARY:Calendaring Interoperability Planning Meeting" ); $e->parse( "STATUS:DRAFT" ); $e->parse( "DESCRIPTION:Project xyz Review Meeting Minutes\\n " . "Agenda\\n " . "1. Review of project version 1.0 requirements.\\n " . "2. Definition of project processes.\\n " . "3. Review of project schedule.\\n " . "Participants: John Smith, Jane Doe, Jim Dandy\\n " . "- It was decided that the requirements need to be signed off by \\n " . "product marketing.\\n " . "- Project processes were accepted.\\n " . "- Project schedule needs to account for scheduled holidays and employee\\n " . " vacation time. Check with HR for specific dates.\\n " . "- New schedule will be distributed by Friday.\\n " . "- Next weeks meeting is cancelled. No meeting until 3/23." ); $e->parse( "LOCATION:LDB Lobby" ); $e->parse( "ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps" ); $e->parse( [ "BEGIN:VALARM", "ACTION:AUDIO", "TRIGGER;VALUE=DATE-TIME:19970224T070000Z", "ATTACH;FMTTYPE=audio/basic:https://host.com/pub/audio-files/ssbanner.aud", "REPEAT:4", "DURATION:PT1H", "X-alarm:non-standard ALARM property", "END:VALARM" ] ); $e->parse( "X-xomment:non-standard property will be displayed, comma escaped");


[index] [top] [up]

3.2.4 ACKNOWLEDGED

ACKNOWLEDGED specifies the UTC date and time at which the corresponding alarm was last sent or acknowledged

As described in

rfc9074 "VALARM Extensions for iCalendar"
ACKNOWLEDGED is OPTIONAL but MUST NOT occur more than once in VALARM and may NOT be supported by all calendaring software.

The value type is (UTC) DATE-TIME.

To ease up usage, constan Kigkonsult\Icalcreator\Vcalendar::ACKNOWLEDGED is available.

For methods and formatting, explore the CREATED property.


[index] [top] [up]

3.2.5 ACTION

This property defines the action to be invoked when an VALARM is triggered,
"AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE". This property is REQUIRED and MUST NOT occur more than once. ("PROCEDURE" is deprecated in [RFC5545].)

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::ACTION
- Kigkonsult\Icalcreator\Vcalendar::AUDIO
- Kigkonsult\Icalcreator\Vcalendar::DISPLAY
- Kigkonsult\Icalcreator\Vcalendar::EMAIL
- Kigkonsult\Icalcreator\Vcalendar::PROCEDURE // Deprecated in rfc5545
are available.

Create ACTION

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createAction()

Example

$str = $component->createAction();

Delete ACTION

Remove ACTION from component.

Format

calendarComponent::deleteAction()

Example

$valarm->deleteAction();

Get ACTION

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getAction()

output = actionValue1

Format 2

Note details about property value/params.

calendarComponent::getAction( true )

output = [ "value" => actionValue1, "params" => xparams2 ) ]

Example

$action = $valarm->getAction();

is ACTION set

Return bool true if ACTION is set (i.e. non-empty).

Format

calendarComponent::isActionSet()

Example

$isPropSet = $valarm->isActionSet();

Set ACTION

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setAction( actionValue [, xparams ] )

actionValue1 = (string) one of Vcalendar::AUDIO / Vcalendar::DISPLAY / Vcalendar::EMAIL / Vcalendar::PROCEDURE xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$valarm->setAction( "DISPLAY" );


[index] [top] [up]

3.2.6 ATTACH

The property provides the capability to associate a document object with a calendar component. The property is
- OPTIONAL and MUST NOT occur more than once in an "ALARM" ("audio")
- REQUIRED and MUST NOT occur more than once in an VALARM ("display"/"procedure"),
- OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL and VALARM ("email").

Logic, described above, is NOT implemented in the method setAttach(), below, multiple ATTACH are allowed in all.

Note, as described in

rfc9073 "Event Publishing Extensions to iCalendar"
ATTACH may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

The default value type for ATTACH is URI. The value type can also be set to BINARY to indicate inline binary encoded content (params2).

If using other parameters than the recommended "FMTTYPE" and the mandatory "ENCODING" (="BASE64")and "VALUE" (="BINARY") for an inline binary encoded attachment, please use only characters within the ASCII character set in parameter name and content, to ensure proper line folding when using createCalendar and/or returnCalendar.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::ATTACH
- Kigkonsult\Icalcreator\Vcalendar::ENCODING
- Kigkonsult\Icalcreator\Vcalendar::FMTTYPE
- Kigkonsult\Icalcreator\Vcalendar::EIGHTBIT // e.i 8BIT
- Kigkonsult\Icalcreator\Vcalendar::BASE64
are available.

Create ATTACH

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createAttach()

Example

$str = $component->createAttach();

Delete ATTACH

Remove ATTACH from component.

Format

calendarComponent::deleteAttach()

Example 1

$valarm->deleteAttach();

Example 2

Delete ATTACH property no 2.

$valarm->deleteAttach( 2 );

Example 3

Deleting all ATTACH properties.

while( $valarm->deleteAttach()) { continue; }

Get ALL ATTACH

Returns array : all ATTACH, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllAttach( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get ATTACH

If set, returns property value(-s), otherwise bool false.

Format 1

calendarComponent::getAttach()

output = attachValue1

Format 2

Note details about property value/params.

calendarComponent::getAttach( propOrderNo/null, true )

propOrderNo = (int) specific property value,

output = [ "value" => attachValue1, "params" => params2 ]

Format 3

calendarComponent::getAttach( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo ATTACH

Example

$attach = $valarm->getAttach();

is ATTACH set

Return bool true if ATTACH is set (i.e. non-empty).

Format

calendarComponent::isAttachSet()

Example

$isPropSet = $vevent->isAttachSet();

Set ATTACH

Set property value. Parameters will be ordered as prescribed in [RFC5545].

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setAttach( attachValue1 [, params [, propOrderNo ]] )

attachValue1 = (string) URI / inline binary encoded content params2 = (array ) ( [ "ENCODING" => "BASE64", "VALUE" => "BINARY" ] [, "FMTTYPE" => contentType ] *[, xparams ] ) contentType = (string) The parameter value MUST be the TEXT for either an IANA registered content type or a non-standard content type. xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc

Example

$vevent->setAttach( "ftp://domain.com/pub/docs/agenda.doc", [ Vcalendar::FMTTYPE => "application/binary" ] );


[index] [top] [up]

3.2.7 ATTENDEE

The property defines an "Attendee" within a calendar component and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL, VFREEBUSY components and VALARM ("ACTION" "email").

Note, as described in rfc9073 "Event Publishing Extensions to iCalendar"
(may NOT be supported by all calendaring software)
for PARTICIPANT

"For backwards compatibility with existing clients and servers when used to schedule events and tasks, the ATTENDEE property MUST be used to specify the scheduling parameters as defined for that property."

the VCALENDAR/component method participants2Attendees()
may be used to create new ATTENDEEs from PARTICIPANT (sub-)components and the CALENDAR-ADDRESS property value with X-parameters : ATTENDEE default values, see setAttendee() below, and PARTICIPANT UID and PARTICIPANT-TYPE.
Another option is to set ATTENDEE and PARTICIPANT in pairs.

This value type for ATTENDEE is URI, a calendar user address.

You can SORT calendar (components) on (asc) ATTENDEE values.

You can export calendar ATTENDEE values as vCards.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::ATTENDEE
- Kigkonsult\Icalcreator\Vcalendar::CUTYPE
- Kigkonsult\Icalcreator\Vcalendar::MEMBER
- Kigkonsult\Icalcreator\Vcalendar::ROLE
- Kigkonsult\Icalcreator\Vcalendar::PARTSTAT
- Kigkonsult\Icalcreator\Vcalendar::RSVP
- Kigkonsult\Icalcreator\Vcalendar::DELEGATED_TO
- Kigkonsult\Icalcreator\Vcalendar::DELEGATED_FROM
- Kigkonsult\Icalcreator\Vcalendar::SENT_BY
- Kigkonsult\Icalcreator\Vcalendar::CN
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
- Kigkonsult\Icalcreator\Vcalendar::DIR
- Kigkonsult\Icalcreator\Vcalendar::GROUP
- Kigkonsult\Icalcreator\Vcalendar::INDIVIDUAL
- Kigkonsult\Icalcreator\Vcalendar::RESOURCE
- Kigkonsult\Icalcreator\Vcalendar::ROOM
- Kigkonsult\Icalcreator\Vcalendar::UNKNOWN
- Kigkonsult\Icalcreator\Vcalendar::COMPLETED
- Kigkonsult\Icalcreator\Vcalendar::NEEDS_ACTION
- Kigkonsult\Icalcreator\Vcalendar::ACCEPTED
- Kigkonsult\Icalcreator\Vcalendar::DECLINED
- Kigkonsult\Icalcreator\Vcalendar::TENTATIVE
- Kigkonsult\Icalcreator\Vcalendar::DELEGATED
- Kigkonsult\Icalcreator\Vcalendar::IN_PROCESS
- Kigkonsult\Icalcreator\Vcalendar::CHAIR
- Kigkonsult\Icalcreator\Vcalendar::REQ_PARTICIPANT
- Kigkonsult\Icalcreator\Vcalendar::OPT_PARTICIPANT
- Kigkonsult\Icalcreator\Vcalendar::NON_PARTICIPANT
- Kigkonsult\Icalcreator\Vcalendar::FALSE
- Kigkonsult\Icalcreator\Vcalendar::TRUE
are available.

Create ATTENDEE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createAttendee()

Example

$str = $component->createAttendee();

Delete ATTENDEE

Remove ATTENDEE from component.

Format

calendarComponent::deleteAttendee()

Example 1

Delete (single/first) ATTENDEE property

$valarm->deleteAttendee();

Example 2

Delete ATTENDEE property no 2.

$valarm->deleteAttendee();

Example 3

Deleting all ATTENDEE properties.

while( $valarm->deleteAttendee()) { continue; }

Get ALL ATTENDEE

Returns array : all ATTENDEE, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllAttendee( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get ATTENDEE

If set, returns property value(-s), otherwise bool false.

Format 1

calendarComponent::getAttendee()

output = attendeeValue1

Format 2

Note details about property value/params.

calendarComponent::getAttendee( propOrderNo/null, true )

propOrderNo = (int) specific property value

output = [ "value" => attendeeValue1, "params" => params2 ]

Format 3

calendarComponent::getAttendee( propOrderNo )

propOrderNo = (int) specific property value

output = attendeeValue1

Example

$attendee = $valarm->getAttendee();

is ATTENDEE set

Return bool true if ATTENDEE is set (i.e. non-empty).

Format

calendarComponent::isAttendeeSet()

Example

$isPropSet = $vevent->isAttendeeSet();

Set ATTENDEE

Set property value. If exist, default parameter values are removed after input (params2). Property value must be prefixed by protocol (ftp://, https://, mailto:, file:// etc, ref. rfc1738), if missing, "mailto:" is set (indicating an internet mail address). Also MEMBER and DIR parameters must be prefixed by protocol. DELEGATED-TO, DELEGATED-FROM, SENT-BY parameters must use protocol "mailto:", prefixed if missing (indicating an internet mail address).

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

The CN, ROLE, PARTSTAT, RSVP, CUTYPE, MEMBER, DELEGATED-TO,DELEGATED-FROM, ORDER, SENT-BY and DIR properties are not accepted (i.e. removed) in a "VFREEBUSY" or "VALARM" "ATTENDEE" property content.

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setAttendee( attendeeValue [, params [, propOrderNo ]] )

attendeeValue1 = (string) a calendar user address, a URI as defined by [RFC 1738] or any other IANA registered form for a URI. params2 = (array) ( [CUTYPE] [,MEMBER] [,ROLE] [,PARTSTAT] [,RVSP] [,DELEGATED-TO] [,DELEGATED-FROM] [,SENT-BY] [,CN] [,DIR] [,LANGUAGE] *[,xparams] ) CUTYPE = "CUTYPE" => "INDIVIDUAL" (An individual, Default) / "GROUP" (A group of individuals) / "RESOURCE" (A physical resource) / "ROOM" (A room resource) / "UNKNOWN" (Otherwise not known) / (string) x-name (Experimental type) / iana-token (string) (Other IANA registered type) MEMBER = "MEMBER" => array( *[ (string) "single member of the group or list membership"]) ROLE = "ROLE" => "CHAIR" (Indicates chair of the calendar entity) / "REQ-PARTICIPANT" (required participation, Default) / "OPT-PARTICIPANT" (optional participation) / "NON-PARTICIPANT" (information purposes only) / (string) x-name (Experimental role) / (string) iana-token (Other IANA role) PARTSTAT = Vcalendar::PARTSTAT => "NEEDS-ACTION" (Event needs action, Default) / "ACCEPTED" (Event accepted) / "DECLINED" (Event declined) / "TENTATIVE" (Event tentatively accepted) / "DELEGATED" (Event delegated) / "NEEDS-ACTION" (To-do needs action, Default) / "ACCEPTED" (To-do accepted) / "DECLINED" (To-do declined) / "TENTATIVE" (To-do tentatively accepted) / "DELEGATED" (To-do delegated) / "COMPLETED" (To-do completed. COMPLETED property has date/time completed) / "IN-PROCESS" (To-do in process of being completed) / "NEEDS-ACTION" (Journal needs action, Default) / "ACCEPTED" (Journal accepted) / "DECLINED" (Journal declined) / (string) x-name (Experimental status) / (string) iana-token (Other IANA registered status) RSVP = Vcalendar::RSVP => (string) "true" / "false", Default (reply expectation) DELEGATED-TO = "DELEGATED-TO" => array(*[(string) "single calendar user to specified by the property has delegated participation"]) DELEGATED-FROM = "DELEGATED-FROM" => array( *[ (string) "single calendar user that have delegated their participation to the calendar user specified by the property" ] ) SENT-BY = Vcalendar::SENT_BY => (string) single calendar user that is acting on behalf of the calendar user specified by the property" LANGUAGE = Vcalendar::LANGUAGE => (string) "lang*" (applies to the CN parameter value) CN = Vcalendar::CN => (string) "common name to be associated with the calendar user specified by the property" DIR = Vcalendar::DIR => (string) "reference to a directory entry associated with the calendar user specified by the property" xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

See rules in detail in rfc5545 "Internet Calendaring and Scheduling Core Object Specification (iCalendar)".

Example

$vevent->setAttendee( "attendee1@ical.net" ); $vevent->setAttendee( "attendee2@ical.net", [ Vcalendar::CUTYPE => "INDIVIDUAL", Vcalendar::MEMBER => [ "member1@ical.net", "member2@ical.net", "member3@ical.net" ], Vcalendar::ROLE => "CHAIR", Vcalendar::PARTSTAT => "ACCEPTED", Vcalendar::RSVP => "true", Vcalendar::DELEGATED_TO => [ "part1@ical.net", "part2@ical.net", "part3@ical.net" ], Vcalendar::DELEGATED_FROM => [ "cio@ical.net", "vice.cio@ical.net" ], Vcalendar::SENT_BY => "secretary@ical.net", Vcalendar::LANGUAGE => "us-EN", Vcalendar::CN => "John Doe", Vcalendar::DIR => "https://www.ical.net/info.doc", "x-agenda" => "status reports", // xparam "x-time" => "15 min" // xparam ] );


[index] [top] [up]

3.2.8 BUSYTYPE

BUSYTYPE specifies the default busy time type

As described in

rfc7953 "New Properties for iCalendar"
BUSYTYPE specifies the default busy time type and may occur once in VAVAILABILITY and may NOT be supported by all calendaring software.

The value type is TEXT.

The values correspond to those used by the "FBTYPE" parameter used on a "FREEBUSY" property, with the exception that the "FREE" value is not used in this property. If not specified on a component that allows this property, the default is "BUSY- UNAVAILABLE".

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::BUSYTYPE
- Kigkonsult\Icalcreator\Vcalendar::BUSY
- Kigkonsult\Icalcreator\Vcalendar::BUSY-UNAVAILABLE
- Kigkonsult\Icalcreator\Vcalendar::BUSY-TENTATIVE
are available.

For methods and formatting, explore the CLASS property.


[index] [top] [up]

3.2.9 CALENDAR-ADDRESS

This property specifies the calendar address for a PARTICIANT.

This value type for CALENDAR-ADDRESS is CAL-ADDRESS (uri).

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::CALENDAR-ADDRESS is available.

"For backwards compatibility with existing clients and servers when used to schedule events and tasks, the ATTENDEE property MUST be used to specify the scheduling parameters as defined for that property.",

see ATTENDEE rfc9073 note.

For methods and formatting, explore the ORGANIZER property but with no prescribed parameters


[index] [top] [up]

3.2.10 CATEGORIES

This property defines the categories for a calendar component and is OPTIONAL and MAY occur more than once in VEVENT, VTODO and VJOURNAL components.

Note, as described in

rfc7953 "New Properties for iCalendar"
CATEGORIES may occur more than once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc7986 "iCalendar Property Extensions"
CATEGORIES may occur more than once in VCALENDAR and may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
CATEGORIES may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for CATEGORIES is TEXT.

You can SORT calendar (components) on (asc) CATEGORIES values.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::CATEGORIES is available.

Create CATEGORIES

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createCategories()

Example

$str = $component->createCategories();

Delete CATEGORIES

Remove CATEGORIES from component.

Format

calendarComponent::deleteCategories( [ propOrderNo ] )

propOrderNo = (int) order number // 1=1st, 2=2nd etc

Example 1

Delete (single/first) CATEGORIES property

$vevent->deleteCategories();

Example 2

Delete CATEGORIES property no 2.

$vevent->deleteCategories( 2 );

Example 3

Deleting all CATEGORIES properties.

while( $vevent->deleteCategories()) { continue; }

Get ALL CATEGORIES

Returns array : all CATEGORIES, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllCategories( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get CATEGORIES

If set, returns property value(-s), otherwise bool false.

Format 1

calendarComponent::getCategories()

output = categoryValue1

Format 2

Note details about property value/params.

calendarComponent::getCategories( propOrderNo/null , true )

propOrderNo = (int) specific property value

output = [ "value" => categories1, "params" => params2 ]

Format 3

calendarComponent::getCategories( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo CATEGORIES

Example

$categories = $valarm->getCategories();

is CATEGORIES set

Return bool true if CATEGORIES is set (i.e. non-empty).

Format

calendarComponent::isCategoriesSet()

Example

$isPropSet = $vevent->isCategoriesSet();

Set CATEGORIES

Set property value.

In spite of the fact that CATEGORIES may contain a (comma separated) list of values, a strong recommendation is to split a CATEGORIES "list" into multiple single CATEGORIES entries.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setCategories( categories [, params [, propOrderNo ]] )

categories1 = (string) textual categories or subtypes of the calendar component, can be specified as a list of categories separated by the COMMA character params2 = (array) ( [Vcalendar::LANGUAGE => (string) "<lang*>"] *[, xparams] ) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

Example

$vevent->setCategories( "project_x" );


[index] [top] [up]

3.2.11 CLASS

This property defines the access classification for a calendar component and is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO and VJOURNAL components.

Note, as described in

rfc7953 "New Properties for iCalendar"
CLASS may occur once in VAVAILABILITY and may NOT be supported by all calendaring software.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::KLASS // note CLASS
- Kigkonsult\Icalcreator\Vcalendar::P_BLIC // note PUBLIC
- Kigkonsult\Icalcreator\Vcalendar::P_IVATE // note PRIVATE
- Kigkonsult\Icalcreator\Vcalendar::CONFIDENTIAL
are available.

Create CLASS

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createClass()

Example

$str = $component->createClass();

Delete CLASS

Remove CLASS from component.

Format

calendarComponent::deleteClass()

Example

$vjournal->deleteClass();

Get CLASS

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getClass()

output = classValue1

Format 2

calendarComponent::getClass( true )

output = [ "value" => classValue1, "params" => xparams2 ]

Example

$class = $valarm->getClass();

is CLASS set

Return bool true if CLASS is set (i.e. non-empty).

Format

calendarComponent::isClassSet()

Example

$isPropSet = $vevent->isClassSet();

Set CLASS

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setClass( classvalue [, xparams ] )

classvalue1 = "PUBLIC" / "PRIVATE" / "CONFIDENTIAL" / (string) iana-token / (string) x-name xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$vevent->setClass( Vcalendar::CONFIDENTIAL );


[index] [top] [up]

3.2.12 COLOR

This property specifies a color used for displaying the VCALENDAR VEVENT, VTODO, VJOURNAL data. The value is a case-insensitive color name taken from the CSS3 set of names, defined in Section 4.3 of [W3C.REC-css3-color-20110607].

Note, as described in

rfc7986 "iCalendar Property Extensions"
COLOR may occur once and may NOT be supported by all calendaring software.

The value type is TEXT.

To ease up usage, constants Kigkonsult\Icalcreator\Vcalendar::COLOR is available.

Create COLOR

If set, returns [RFC7986] formatted string, otherwise empty string.

Format

calendarComponent::createColor()

Example

$str = $component->createColor();

Delete COLOR

Remove COLOR from component.

Format

calendarComponent::deleteColor()

Example

$vevent->deleteColor();

Get COLOR

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getColor( )

output = color1

Format 2

Note details about property value/params.

calendarComponent::getColor( true )

output = [ "value" => color1, "params" => xparams2 ]

Example

$transp = $vtodo->getColor();

is COLOR set

Return bool true if COLOR is set (i.e. non-empty).

Format

calendarComponent::isColorSet()

Example

$isPropSet = $vevent->isColorSet();

Set COLOR

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setColor( color [, xparams ] )

transp1 = <color> xparams2 = (array) *( (string) key => (string) value ) // key prefix "X-"

Example

$vevent->setColor( "Blue" );


[index] [top] [up]

3.2.13 COMMENT

This property specifies non-processing information intended to provide a comment to the calendar user and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL, VFREEBUSY, STANDARD and DAYLIGHT components.

Note, as described in

rfc7953 "New Properties for iCalendar"
COMMENT may occur more than once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
COMMENT may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for COMMENT is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::COMMENT
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create COMMENT

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createComment()

Example

$str = $component->createComment();

Delete COMMENT

Remove COMMENT from component.

Format

calendarComponent::deleteComment()

Example 1

Delete (single/first) COMMENT property

$vevent->deleteComment();

Example 2

Delete COMMENT property no 2.

$vevent->deleteComment( 2 );

Example 3

Deleting all COMMENT properties.

while( $vevent->deleteComment()) { continue; }

Get ALL COMMENT

Returns array : all COMMENT, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllComment( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get COMMENT

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getComment()

output = commentValue1

Format 2

Note details about property value/params.

calendarComponent::getComment( propOrderNo/null , true )

propOrderNo = (int) specific property value

output = [ "value" => commentValue1, "params" => params2 ]

Format 3

calendarComponent::getComment( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo COMMENT

Example

$comment = $vevent->getComment();

is COMMENT set

Return bool true if COMMENT is set (i.e. non-empty).

Format

calendarComponent::isCommentSet()

Example

$isPropSet = $vevent->isCommentSet();

Set COMMENT

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setComment( commentValue [, params [, propOrderNo ]] )

commentValue1 = (string) Value type Text params2 = array( Vcalendar::ALTREP => (string) "<an alternate text representation, URI>"], Vcalendar::LANGUAGE => (string) "lang*"] *(xparams ) ) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

Example

$vevent->setComment( "this is a comment" );


[index] [top] [up]

3.2.14 COMPLETED

This property defines the date and time that a VTODO was actually completed and is OPTIONAL and MUST NOT occur more than once.

The value type for COMPLETED is UTC timezone DATE-TIME.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::COMPLETED is available.

For methods and formatting, explore the CREATED property.


[index] [top] [up]

3.2.15 CONFERENCE

CONFERENCE specifies information for accessing a conferencing system for attendees of a meeting or task.

Note, as described in

rfc7986 "iCalendar Property Extensions"
CONFERENCE may be specified multiple times in a VEVENT and VTODO and may NOT be supported by all calendaring software.

The value type is URI.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::CONFERENCE
- Kigkonsult\Icalcreator\Vcalendar::URI
- Kigkonsult\Icalcreator\Vcalendar::FEATURE
- Kigkonsult\Icalcreator\Vcalendar::LABEL
- Kigkonsult\Icalcreator\Vcalendar::URI
- Kigkonsult\Icalcreator\Vcalendar::LABEL
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create CONFERENCE

If set, returns [RFC7986] formatted string, otherwise empty string.

Format

calendarComponent::createConference()

Example

$str = $component->createConference();

Delete CONFERENCE

Remove CONFERENCE from component.

Format

calendarComponent::deleteConference()

Example

$vevent->deleteConference();

Get ALL CONFERENCE

Returns array : all CONFERENCE, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllConference( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get CONFERENCE

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getConference()

output = url1

Format 2

Note details about property value/params.

calendarComponent::getConference( true )

output = [ "value" => conference1, "params" => params2 ]

Example

$conference = $vevent->getConference();

is CONFERENCE set

Return bool true if CONFERENCE is set (i.e. non-empty).

Format

calendarComponent::isConferenceSet()

Example

$isPropSet = $vevent->isConferenceSet();

Set CONFERENCE

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), InvalidArgumentException on url error.

Format

calendarComponent::setConference( conference [, params ] )

conference1 = (string) Value type URI params2 = [ Vcalendar::VALUE => Vcalendar::URI, Vcalendar::FEATURE => featureValue, Vcalendar::LABEL => human-readable data, Vcalendar::LANGUAGE => (string) "lang" // opt. if LABEL is set xparams ] featureValue = one or more (comma separated) Vcalendar::AUDIO // Audio capability Vcalendar::CHAT // Chat or instant messaging Vcalendar::FEED // Blog or Atom feed Vcalendar::MODERATOR // Moderator dial-in code Vcalendar::PHONE // Phone conference Vcalendar::SCREEN // Screen sharing Vcalendar::VIDEO // Video capability x-name // Experimental type iana-token // Other IANA-registered type lang = as defined in [RFC5546] xparams = *[ (string) key => (string) value ] // key prefix "X-"


[index] [top] [up]

3.2.16 CONTACT

The property is used to represent textual contact information or alternately a reference to textual contact information associated with the calendar component. The property is OPTIONAL and MUST NOT occur more than once in a VFREEBUSY or MAY occur more than once in VEVENT, VTODO and VJOURNAL components.

Note, as described in

rfc7953 "New Properties for iCalendar"
CONTACT may occur more than once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
CONTACT may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for CONTACT is TEXT.

You can SORT calendar (components) on (asc) CONTACT values.

You can export calendar CONTACT values as vCards.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::CONTACT
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create CONTACT

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createContact()

Example

$str = $component->createContact();

Delete CONTACT

Remove CONTACT from component.

For CONTACT in VFREEBUSY (may only occur once), skip the "propOrderNo" argument.

Format

calendarComponent::deleteContact( [ propOrderNo ] )

Example 1

Delete (single/first) CONTACT property

$vevent->deleteContact();

Example 2

Delete CONTACT property no 2.

$vevent->deleteContact( 2 );

Example 3

Deleting all CONTACT properties.

while( $vevent->deleteContact()) { continue; }

Get ALL CONTACT

Returns array : all CONTACT, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllContact( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get CONTACT

For CONTACT in VFREEBUSY (may only occur once), skip the "propOrderNo" argument.

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getContact()

output = contactValue1

Format 2

Note details about property value/params.

calendarComponent::getContact( propOrderNo/null , true )

propOrderNo = (int) specific property value

output = [ "value" => contactValue1, "params" => params2 ]

Format 3

calendarComponent::getContact( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo CONTACT

Example

$contact = $vevent->getContact();

is CONTACT set

Return bool true if CONTACT is set (i.e. non-empty).

Format

calendarComponent::isContactSet()

Example

$isPropSet = $vevent->isContactSet();

Set CONTACT

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

For CONTACT in VFREEBUSY (may only occur once), skip the "propOrderNo" argument.

Format

calendarComponent::setContact( contactValue [, params [, propOrderNo ]] )

contactValue1 = (string) Value type TEXT params2 = [ Vcalendar::ALTREP => (string) "<an alternate text representation, URI>"], Vcalendar::LANGUAGE => (string) "lang*"], *(xparams ) ] xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

Example

$c->setContact( "tel 012-34 56 789" )


[index] [top] [up]

3.2.17 CREATED

This property specifies the date and time that the calendar information was created by the calendar user agent in the calendar store. Note: This is analogous to the creation date and time for a file in the file system. The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO and VJOURNAL components.

As described in

rfc7953 "New Properties for iCalendar"
CREATED may occur once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar",
CREATED may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for CREATED is UTC timezone DATE-TIME.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::CREATED is available.

Create CREATED

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createCreated()

Example

$str = $component->createCreated();

Delete CREATED

Remove CREATED from component.

Format

calendarComponent::deleteCreated()

Example

$vevent->deleteCreated();

Get CREATED

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getCreated()

output = createdDate1

Format 2

Note details about property value/params.

calendarComponent::getCreated( true )

output = [ "value" => createdDate1, "params" => xparams2 ]

Example

$created = $vevent->getCreated();

is CREATED set

Return bool true if CREATED is set (i.e. non-empty).

Format

calendarComponent::isCreatedSet()

Example

$isPropSet = $vevent->isCreatedSet();

Set CREATED

Set property value. Input date is always a UTC timezone DATE-TIME or, if "offset" parameter is used, timezone is set to first found matching timezone.

The current UTC date-time is set if invoked without or an empty value and may be used to set or update a previously set property value to current UTC date-time.

The method returns the class instance (static).

The method throws Exception on DateTime error.

Format

calendarComponent::setCreated( [ createdDate [, xparams ]] )

createdDate = (object) DateTimeInterface instance, will be set to UTC if not UTC timezone createdDate = (string) date/datetime string* xparams2 = array( *[ (string) key => (string) value ] )
date/datetime string* please notice date restraints.

Example 1

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ calendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtodo = $vcalendar->newVtodo(); try { $vtodo->setCreated( new DateTime( "2006-08-11 14:30:35 UTC" )); // 11 august 2006 14.30.35 UTC } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.18 DESCRIPTION

This property provides a more complete textual description of the calendar component, than that provided by the SUMMARY property (, analogous to a mail BODY). The property is OPTIONAL, MUST NOT occur more than once within VEVENT, VTODO or VALARM (PROCEDURE) but can be specified multiple times within the VJOURNAL calendar component. The property is REQUIRED in VALARM (DISPLAY, EMAIL) component.

Note, as described in

rfc7953 "New Properties for iCalendar"
DESCRIPTION may occur once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc7986 "iCalendar Property Extensions"
DESCRIPTION may occur more than once in VCALENDAR (with different "LANGUAGE" parameter values on each) and may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
DESCRIPTION may occur once in PARTICIPANT, VRESOURCE and VLOCATION and may NOT be supported by all calendaring software.

The value type for DESCRIPTION is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::DESCRIPTION
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create DESCRIPTION

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createDescription()

Example

$str = $component->createDescription();

Get ALL DESCRIPTION

Returns array : all DESCRIPTION, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllDescription( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Delete DESCRIPTION

Remove DESCRIPTION from component.

Format

calendarComponent::deleteDescription()

Example 1

Delete (single/first) DESCRIPTION property.

$vevent->deleteDescription();

Example 2

Delete DESCRIPTION property no 2, VCALENDAR/VJOURNAL only.

$vjournal->deleteDescription( 2 );

Example 3

Deleting all DESCRIPTION properties. VCALENDAR/VJOURNAL only.

while( $vjournal->deleteDescription()) { continue; }

Get DESCRIPTION

If set, returns property value(-s), otherwise bool false.

Format 1

get (single) DESCRIPTION property, for VCALENDAR/VJOURNAL, first/next

calendarComponent::getDescription()

output = descriptionValue1

Format 2

Note details about property value/params.

calendarComponent::getDescription( propOrderNo/null ,true )

propOrderNo = (int) order number // 1=1st, 2=2nd etc, VCALENDAR/VJOURNAL only

output = [ "value" => descriptionValue1, "params" => params2 ]

Example

$description = $vevent->getDescription();

is DESCRIPTION set

Return bool true if DESCRIPTION is set (i.e. non-empty).

Format

calendarComponent::isDescriptionSet()

Example

$isPropSet = $vevent->isDescriptionSet();

Set DESCRIPTION

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setDescription( descriptionValue [, params [, propOrderNo ]] )

descriptionValue1 = (string) Value type TEXT params2 = array( Vcalendar::ALTREP => (string) "<an alternate text representation, URI>"], Vcalendar::LANGUAGE => (string) "lang*"] *(xparams ) ) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc, VCALENDAR/VJOURNAL only lang* = as defined in [RFC5546]

Example

$vevent->setDescription( "This is a description" );


[index] [top] [up]

3.2.19 DTEND

This property specifies the date and time that a calendar component ends. The property is OPTIONAL and MUST NOT occur more than once in VFREEBUSY and VEVENT. In VEVENT, it only occurs if DURATION NOT occurs.

Note, as described in

rfc7953 "Calendar Availability"
DTEND may occur once in VAVAILABILITY and AVAILABLE, only if DURATION NOT occurs. VAVAILABILITY / AVAILABLE may NOT be supported by all calendaring software.

If specified, DTEND MUST be "DATE-TIME" value specified as either the date with UTC time or the date with local time and a time zone reference.

The default value type for DTEND is DATE-TIME, can be set to a DATE value type.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::DTEND
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DATE
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
- Kigkonsult\Icalcreator\Vcalendar::TZID
are available.

The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])

Notice that an end date without a time is in effect midnight of the day before the date, so for timeless dates, use the date following the event date for it to be correct. For an "all-day event" and using timeless dates, the DTEND is equal DTSTART plus one day, example all-day event (2007-12-01)
DTSTART;VALUE=DATE:20071201
DTEND;VALUE=DATE:20071202.

Create DTEND

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createDtend()

Example

$str = $component->createDtend();

Delete DTEND

Remove DTEND from component.

Format

calendarComponent::deleteDtend()

Example

$vevent->deleteDtend();

Get DTEND

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getDtend()

output = dtendDate1

Format 2

Note details about property value/params.

calendarComponent::getDtend( true )

output = [ "value" => dtendDate1, "params" => params2 ]

Example

$dtend = $vevent->getDtend();

is DTEND set

Return bool true if DTEND is set (i.e. non-empty).

Format

calendarComponent::isDtendSet()

Example

$isPropSet = $vevent->isDtendSet();

Set DTEND

Set property value. If DATE value type is expected, "VALUE" = "DATE" must be set (in params2) otherwise DATE-TIME (default) value type is set.

Within the "VFREEBUSY" calendar component, the time MUST be specified in the UTC datetime zone.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), Exception on DateTime error.

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setDtend( dtendDate [, params2 ] )

dtendDate = (object) DateTimeInterface instance dtendDate = (string) date/datetime string* params2 = (array) ([ tzidparam/datetimeparam/dateparam ] *[,xparams]) tzidparam = Vcalendar::TZID => (string) <timezone identifier> // output as local date-time with timezone identifier // if tzidparam is "UTC" then output date-time is suffixed by 'Z' datetimeparam = Vcalendar::VALUE => Vcalendar::DATE_TIME // default, output as date-time dateparam = Vcalendar::VALUE => Vcalendar::DATE // output as DATE, ex. all-day event xparams = (string) key => (string) value // key prefix "X-"
* please notice date restraints.

Example 1

try { $vevent->setDtend( new DateTime( '2006-08-11 16:30:00' )); // 11 august 2006 16.30.00 local date } catch( Exception $e ) { die( $e->getMessage()); }

Example 2

End of an all-day event.

use Kigkonsult\Icalcreator\Vcalendar; try { $vevent->setDtend( '20060811', [ Vcalendar::VALUE => Vcalendar::DATE ] ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 3

Will output: DTEND;TZID=Europe/Stockholm:20060811T093000

try { $vevent->setDtend( new DateTime( '2006-08-11 09:30:00', new DateTImeZone( 'Europe/Stockholm' )); } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.20 DTSTAMP

The property indicates the date/time the Vcalendar instance was created and is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO, VJOURNAL and VFREEBUSY components. DTSTAMP is AUTOMATICALLY GENERATED in iCalcreator at instance creation.

Note, as described in

rfc7953 "New Properties for iCalendar"
DTSTAMP MUST occur once in VAVAILABILITY and AVAILABLE and may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
DTSTAMP may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

DTSTAMP may be required when importing iCal formatted information into some calendar software
(MS etc.), as well as (calendar) x-properties "X-WR-CALNAME", "X-WR-CALDESC" and
"X-WR-TIMEZONE", METHOD property (value PUBLISH etc.) and the (also auto created) UID property.

The value type for DTSTAMP is UTC timezone DATE-TIME.

You can SORT calendar (components) on (asc) DTSTAMP values.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::DTSTAMP is available.

For methods and formatting, explore the CREATED property. Note, NO deleteDtstamp() method, use setDtstamp() to recreate.


[index] [top] [up]

3.2.21 DTSTART

This property specifies when the calendar component begins. The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO, VJOURNAL and VFREEBUSY components. The property is REQUIRED, but MUST NOT occur more than once in STANDARD and DAYLIGHT components.

Note, as described in

rfc7953 "Calendar Availability"
DTSTART may occur once in VAVAILABILITY and MUST occur once in AVAILABLE.
VAVAILABILITY / AVAILABLE may NOT be supported by all calendaring software.
If specified in VAVAILABILITY / AVAILABLE, DTSTART MUST be "DATE-TIME" value specified as either the date with UTC time or the date with local time and a time zone reference.

The default value type for DTSTART is DATE-TIME, can be set to a DATE value type.

For an "all-day event" and using timeless dates, example (2007-12-01)
DTSTART;VALUE=DATE:20071201
DTEND;VALUE=DATE:20071202. // opt., in effect midnight of the day before the date!!

For methods and formatting, explore the DTEND property.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::DTSTART
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DATE
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
- Kigkonsult\Icalcreator\Vcalendar::TZID
are available.


[index] [top] [up]

3.2.22 DUE

This property defines the date and time when a VTODO is expected to be completed and is OPTIONAL and MUST NOT occur more than once and only if DURATION NOT occurs.

The default value type for DUE is DATE-TIME, can be set to a DATE value type.

The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])

For methods and formatting, explore the DTEND property.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::DUE
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DATE
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
- Kigkonsult\Icalcreator\Vcalendar::TZID
are available.


[index] [top] [up]

3.2.23 DURATION

The property specifies a positive duration of time.

In a VEVENT
it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DTEND. If one occurs, so MUST NOT the other.
In a VTODO
it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DUE. If one occurs, so MUST NOT the other.
In a VFREEBUSY
it is OPTIONAL and MUST NOT occur more than once. ([RFC5545])
it can not appear. ([RFC5545])
In a VALARM
it is OPTIONAL and MUST NOT occur more than once and MUST occur in pair with TRIGGER. If one occurs, so MUST the other.

As described in

rfc7953 "Calendar Availability"
Either DTEND or DURATION MAY appear in VAVAILABILITY / AVAILABLE, but DTEND and DURATION MUST NOT occur in the same VAVAILABILITY / AVAILABLE.
VAVAILABILITY / AVAILABLE may NOT be supported by all calendaring software.
The VAVAILABILITY DURATION MUST NOT be present if DTSTART is not present

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::DURATION is available.

Create DURATION

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createDuration()

Example

$str = $component->createDuration();

Delete DURATION

Remove DURATION from component.

Format

calendarComponent::deleteDuration()

Example

$valarm->deleteDuration();

Get DURATION

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getDuration()

output = duration1

Format 2

Note details about property value/params.

calendarComponent::getDuration( true )

output = [ "value" => duration1, "params" => xparams2 ]

Example

$duration = $vtodo->getDuration();

option

If (1st) argument is true and a 2nd is used and set to true, returned output is in a DATE-TIME output format (like DTEND / DUE), based on DTSTART value with the added DURATION value (incl. opt. timezone).

is DURATION set

Return bool true if DURATION is set (i.e. non-empty).

Format

calendarComponent::isDurationSet()

Example

$isPropSet = $vevent->isDurationSet();

Set DURATION

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), Exception on DateInterval error.

Format

calendarComponent::setDuration( duration [, xparams ] )

duration = (object) DateInterval class instance duration = (string) dur-value = ["+"] "P" (dur-date/dur-time/dur-week) like "P15DT5H0M20S" dur-date = dur-day [dur-time] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-week = 1*DIGIT "W" dur-hour = 1*DIGIT "H" [dur-minute] dur-minute = 1*DIGIT "M" [dur-second] dur-second = 1*DIGIT "S" dur-day = 1*DIGIT "D" xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example 1

One day duration.

try { $vtodo->setDuration( new DateInterval( "P1D" )); } catch( Exception $e ) { die( $e->getMessage()); }

Example 2

Four hours duration.

try { $vtodo->setDuration( "PT4H" ); } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.24 EXDATE

This property defines the list of date/time exceptions for a recurring calendar component and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL components.

The default value type for EXDATE is DATE-TIME, can be set to a DATE value type.

rfc7953 "New Properties for iCalendar"
EXDATE may occur more than once in AVAILABLE, may NOT be supported by all calendaring software.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::EXDATE
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DATE
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
are available.

Create EXDATE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createExdate()

Example

$str = $component->createExdate();

Delete EXDATE

Remove EXDATE from component.

Format

calendarComponent::deleteExdate()

Example 1

$vtodo->deleteExdate();

Example 2

Delete EXDATE property no 2.

$vjournal->deleteExdate( 2 );

Example 3

Deleting all EXDATE properties.

while( $vjournal->deleteExdate()) { continue; }

Get ALL EXDATE

Returns array : all EXDATE, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllExdate( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get EXDATE

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getExdate()

output = exdates1 (with date1)

Format 2

Note details about property value/params.

calendarComponent::getExdate( propOrderNo/null, true )

propOrderNo = (int) specific property value

output = [ "value" => exdates1 (with date1), "params" => xparams2 ]

Example

$exdate = $vtodo->getExdate();

is EXDATE set

Return bool true if EXDATE is set (i.e. non-empty).

Format

calendarComponent::isExdateSet()

Example

$isPropSet = $vevent->isExdateSet();

Set EXDATE

Set property value.

The value type for EXDATE should match the DTSTART value type.

If no "VALUE" value type is set, DATE-TIME (default) value type is set.

If timezone in 1st date, all remaining dates are within this timezone and param "TZID" is set.

EXDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).

In spite of the fact that EXDATE may contain a (comma separated) list of values, a strong recommendation is to split an EXDATE "list" into multiple single EXDATE entries. (But if you do, don't mix timezones, may result in incorrect date values.)

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), Exception on DateTime error.

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setExdate( exdates [, params [, propOrderNo ]] )

exdates1 = date / (array) ( date *[, date ] ) date = (object) DateTimeInterface instance date = (string) date/datetime string* params2 = (array) ([(datetimeparam/dateparam) / tzidparam] *[,xparams]) // default, output as date-time datetimeparam = Vcalendar::VALUE => Vcalendar::DATE_TIME // output as DATE dateparam = Vcalendar::VALUE => Vcalendar::DATE tzidparam = Vcalendar::TZID => (string) <timezone identifier> // key prefix "X-" xparams = (string) key => (string) value // 1=1st, 2=2nd etc propOrderNo = (int) order number
* please notice date restraints.

Example

Exclude 2006-08-11 from the recurrence pattern.

use Kigkonsult\Icalcreator\Vcalendar; try { $vevent->setExdate( [ new DateTime( '2006-08-11' ) ], [ Vcalendar::VALUE => Vcalendar::DATE ] ); } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.25 EXRULE

This property defines a rule or repeating pattern for an exception to a recurrence set and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL components.

EXRULE is deprecated in [RFC5545]!

Uses the methods and formats as RRULE.


[index] [top] [up]

3.2.26 FREEBUSY

The property defines one or more free or busy time intervals in a VFREEBUSY calendar component.

The value type for FREEBUSY is PERIOD. A PERIOD is DATE-TIME/DATE-TIME or DATE-TIME/duration and in the UTC timezone

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::FREEBUSY
- Kigkonsult\Icalcreator\Vcalendar::FBTYPE
- Kigkonsult\Icalcreator\Vcalendar::FREE
- Kigkonsult\Icalcreator\Vcalendar::BUSY
- Kigkonsult\Icalcreator\Vcalendar::BUSY_UNAVAILABLE
- Kigkonsult\Icalcreator\Vcalendar::BUSY_TENTATIVE
are available.

Create FREEBUSY

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createFreebusy()

Example

$str = $component->createfreebusy();

Delete FREEBUSY

Remove FREEBUSY from component.

Format

calendarComponent::deleteFreebusy()

Example 1

Delete (single/first) FREEBUSY property

$vfreebusy->deleteFreebusy();

Example 2

Delete FREEBUSY property no 2.

$vfreebusy->deleteFreebusy( 2 );

Example 3

Deleting all FREEBUSY properties.

while( $vfreebusy->deleteFreebusy()) { continue; }

Get ALL FREEBUSY

Returns array : all FREEBUSY, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllFreebusy( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get FREEBUSY

If set, returns property value, otherwise bool false. Note, NO freebusytype!

Format 1

calendarComponent::getFreebusy()

output = (array) periods2 with (array) startdate, enddate/duration2 below

Format 2

If set, returns property value and params, otherwise bool false. Freebusytype in params.

calendarComponent::getFreebusy( propOrderNo/null , true )

propOrderNo = (int) specific property value

output = [ "value" => array( periods), "params" => [ "FBTYPE" => freebusytype, *xparams3 ] ] periods = (array) periods2 with (array) startdate, enddate/duration2 below

Example

$freebusy = $vfreebusy->getFreebusy();

is FREEBUSY set

Return bool true if FREEBUSY is set (i.e. non-empty).

Format

calendarComponent::isFreebusySet()

Example

$isPropSet = $vfreebusy->isFreebusySet();

Set FREEBUSY

Set property value. FREEBUSY date is always a UTC timezone DATE-TIME in pair with another UTC timezone DATE-TIME or a DateInteval. Set dates within the same timezone, otherwise it may lead to unpredictable result;

In spite of the fact that FREEBUSYs may contain a (comma separated) list of values, a strong recommendation is to split a FREEBUSYs "list" into multiple single FREEBUSY entries.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), Exception on DateTime/DateInterval error.

Format

calendarComponent::setFreebusy( freebusytype, periods2 [,xparams [,propOrderNo ]] )

freebusytype = one of Vcalendar::FREE / Vcalendar::BUSY Default / Vcalendar::BUSY-UNAVAILABLE / Vcalendar::BUSY-TENTATIVE / x-name periods2 = (array) ( period [, period... ] ) period = (array) ( startdate, enddate/duration ) startdate/enddate = (object) DateTimeInterface instance, will be set to UTC if not UTC timezone startdate/enddate = (string) datetime string* duration = (object) DateInterval class instance duration = (string) dur-value = ("+")"P"(dur-date/dur-time/dur-week) like "P15DT5H0M20S" dur-date = dur-day [dur-time] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-week = 1*DIGIT "W" dur-hour = 1*DIGIT "H" [dur-minute] dur-minute = 1*DIGIT "M" [dur-second] dur-second = 1*DIGIT "S" dur-day = 1*DIGIT "D" xparams3 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc
* please notice date restraints.

Example 1

See rules in detail in RFC5545 "Internet Calendaring and Scheduling Core Object Specification (iCalendar)". The recommended way :

Example 1

Single FREEBUSY entries

try { $freebusy1->setFreebusy( Vcalendar::FREE, [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ] ); $freebusy1->setFreebusy( Vcalendar::FREE, [ new DateTime( "2003-03-03 03:03:03 UTC" ), new DateInterval( "P5DT5H5M5S" ) ], ); $freebusy1->setFreebusy( Vcalendar::FREE, [ "4 April 2005 4:4:4 UTC", "P2D" ] ) ->setFreebusy( Vcalendar::BUSY, [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ], ) ->setFreebusy( Vcalendar::BUSY, [ new DateTime( "2003-03-03 03:03:03 UTC" ), "P2D" ], ) ->setFreebusy( Vcalendar::BUSY, [ "4 April 2005 4:4:4 UTC", new DateInterval( "PT5H" ) ], ) ->setFreebusy( Vcalendar::BUSY, [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2003-03-03 03:03:03 UTC" ) ] ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 2

FREEBUSY entries as list of entries

try { $freebusy2->setFreebusy( Vcalendar::FREE, [ [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ], [ new DateTime( "2003-03-03 03:03:03 UTC" ), new DateInterval( "P5DT5H5M5S" ) ], [ "4 April 2005 4:4:4 UTC", "P2D" ] ] ) ->setFreebusy( Vcalendar::BUSY, [ [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ], [ new DateTime( "2003-03-03 03:03:03 UTC" ), "P2D" ], [ "4 April 2005 4:4:4 UTC", new DateInterval( "PT5H" ) ], [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2003-03-03 03:03:03 UTC" ) ] ] ); } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.27 GEO

This property specifies information related to the global position for the activity specified by VEVENT and VTODO components and is OPTIONAL and MUST NOT occur more than once.

Note, as described in

rfc9073 "Event Publishing Extensions to iCalendar"
GEO may occur once in PARTICIPANT, VRESOURCEand VLOCATION and may NOT be supported by all calendaring software.

Value type for latitude and longitude is FLOAT.

Values for latitude and longitude shall be expressed as decimal fractions of degrees. Whole degrees of latitude shall be represented by a two-digit decimal number ranging from 0 through 90. Whole degrees of longitude shall be represented by a decimal number ranging from 0 through 180. When a decimal fraction of a degree is specified, it shall be separated from the whole number of degrees by a decimal point.

The output (float) latitude and longitude values are presented up to six decimals.

Using the non-standard directive "GEOLOCATION", iCalcreator returns output by combining the LOCATION and GEO property values, (separated by "/") and only if GEO is set).

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::GEO
- Kigkonsult\Icalcreator\Vcalendar::LATITUDE
- Kigkonsult\Icalcreator\Vcalendar::LONGITUDE
are available.

Create GEO

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createGeo()

Example

$str = $component->createGeo();

Delete GEO

Remove GEO from component.

Format

calendarComponent::deleteGeo()

Example

$vevent->deleteGeo();

Get GEO

If set, returns GEO property value (latitude/longitude) as prescribed in [RFC5545], otherwise bool false.

Format 1

calendarComponent::getGeo()

output = array( "latitude" => <latitude> , "longitude" => <longitude>))

Format 2

calendarComponent::getGeo( true )

Note details about property value/params.

output = [ "value" => array ( "latitude" => <latitude>, "longitude" => <longitude> ), "params" => xparams1 ]

Example

$geo = $vevent->getGeo();

is GEO set

Return bool true if GEO is set (i.e. non-empty).

Format

calendarComponent::isGeoSet()

Example

$isPropSet = $vevent->isGeoSet();

Set GEO

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty values and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setGeo( latitude, longitude [, xparams ] )

latitude = (float) latitude longitude = (float) longitude xparams1 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$vevent->setGeo( 11.23456, -23.45678 );


[index] [top] [up]

3.2.28 IMAGE

IMAGE specifies an image associated with the calendar or a calendar component.

Note, as described in

rfc7986 "iCalendar Property Extensions"
IMAGE may be specified multiple times in VCALENDAR and in VEVENT, VTODO, VJOURNAL and may NOT be supported by all calendaring software.

The value type is URI.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::IMAGE
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::DISPLAY
- Kigkonsult\Icalcreator\Vcalendar::URI
- Kigkonsult\Icalcreator\Vcalendar::BINERY
- Kigkonsult\Icalcreator\Vcalendar::ENCODING
- Kigkonsult\Icalcreator\Vcalendar::FMTTYPE
- Kigkonsult\Icalcreator\Vcalendar::BASE64
are available.

Methods and usage, below, applies also to Vcalendar instance.

Create IMAGE

If set, returns [RFC7986] formatted string, otherwise empty string.

Format

calendarComponent::createImage()

Example

$str = $component->createImage();

Delete IMAGE

Remove IMAGE from component.

Format

calendarComponent::deleteImage()

Example 1

$vevent->deleteImage();

Example 2

Delete IMAGE property no 2.

$vevent->deleteImage( 2 );

Example 3

Deleting all IMAGE properties.

while( $vevent->deleteImage()) { continue; }

Get ALL IMAGE

Returns array : all IMAGE, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllImage( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get IMAGE

If set, returns property value(-s), otherwise bool false.

Format 1

calendarComponent::getImage()

output = imageValue1

Format 2

Note details about property value/params.

calendarComponent::getImage( propOrderNo/null , true )

propOrderNo = (int) specific property value,

output = [ "value" => imageValue1, "params" => params2 ]

Format 3

calendarComponent::getImage( propOrderNo )

propOrderNo = (int) specific property value order number

Get propOrderNo IMAGE

Example

$image = $valarm->getImage();

is IMAGE set

Return bool true if IMAGE is set (i.e. non-empty).

Format

calendarComponent::isImageSet()

Example

$isPropSet = $vevent->isImageSet();

Set IMAGE

Set property value. Parameters will be ordered as prescribed in [RFC7986].

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setImage( imageValue1 [, params [, propOrderNo ]] )

imageValue1 = (string) URI / inline binary encoded content params2 1 = [ // value is URI Vcalendar::VALUE => Vcalendar::URI ], imageParams ] params2 2 = [ // value is binary Vcalendar::ENCODING => Vcalendar::BASE64, Vcalendar::VALUE => Vcalendar::BINARY, imageParams ] imageParams = [ Vcalendar::FMTTYPE => contentType, Vcalendar::ALTREP => (string) "<an alternate text representation, URI>", Vcalendar::DISPLAY => displayVal, xparams ] contentType = (string) The parameter value MUST be the TEXT for either an IANA registered content type or a non-standard content type. displayval = one or more (comma separated) Vcalendar::BADGE // image inline with the title of the event, DEFAULT Vcalendar::GRAPHIC // a full image replacement for the event itself Vcalendar::FULLSIZE // an image that is used to enhance the event Vcalendar::THUMBNAIL // a smaller variant of "FULLSIZE" to be used // when space for the image is constrained x-name // Experimental type iana-token // Other IANA-registered type xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc

Example

$vevent->setImage( "ftp://domain.com/pub/docs/agenda.doc", [ Vcalendar::FMTTYPE => "application/binary" ] );


[index] [top] [up]

3.2.29 LAST-MODIFIED

The property specifies the date and time that the information associated with the calendar component was last revised in the calendar store. The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO, VJOURNAL and VTIMEZONE components.

Note, as described in

rfc7953 "New Properties for iCalendar"
LAST-MODIFIED may occur once in VAVAILABILITY and AVAILABLE and may NOT be supported by all calendaring software.
rfc7986 "iCalendar Property Extensions"
LAST-MODIFIED may occur once in VCALENDAR and may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
LAST-MODIFIED may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for LAST-MODIFIED is UTC timezone DATE-TIME.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::LAST_MODIFIED is available.

For methods and formatting, explore the CREATED property.


[index] [top] [up]

3.2.30 LOCATION

The property defines the intended venue for the activity defined by a calendar component. The property is OPTIONAL and MUST NOT occur more than once in VEVENT and VTODO components.

Note, as described in

rfc7953 "New Properties for iCalendar"
LOCATION may occur once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
LOCATION may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

the VCALENDAR / VEVENT / VTODO method vlocationNames2Location()
may be used to create a new LOCATION from (first found) VLOCATION (sub-)component and the NAME property value with X-parameters for VLOCATION properties UID and LOCATION-TYPE.
Another option is to set LOCATION and VLOCATION in pairs.

The value type for LOCATION is TEXT.

You can SORT calendar (components) on (asc) LOCATION values.

Using the non-standard directive "GEOLOCATION", iCalcreator returns output by combining the LOCATION and GEO property values, (separated by "/") and only if GEO is set).

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::LOCATION
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create LOCATION

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createLocation()

Example

$str = $component->createLocation();

Delete LOCATION

Remove LOCATION from component.

For LOCATION in PARTICIPANT (may occur more than once), review CATEGORIES delete-method with "propOrderNo" argument.

Format

calendarComponent::deleteLocation()

Example

$vevent->deleteLocation();

Get ALL LOCATION

Returns array : all LOCATION, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllLocation( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get LOCATION

If set, returns property value, otherwise bool false.

For LOCATION in PARTICIPANT (may occur more than once), review CATEGORIES get-method with "propOrderNo" argument.

Format 1

calendarComponent::getLocation()

output = location1

Format 2

Note details about property value/params.

calendarComponent::getLocation( true )

output = [ "value" => location1, "params" => param2 ]

Example

$location = $vevent->getLocation();

is LOCATION set

Return bool true if LOCATION is set (i.e. non-empty).

Format

calendarComponent::isLocationSet()

Example

$isPropSet = $vevent->isLocationSet();

Set LOCATION

Set property value.

For LOCATION in PARTICIPANT (may occur more than once), review CATEGORIES set-method with "propOrderNo" argument.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setLocation( location [, param [, propOrderNo]] )

location1 = (string) Value type TEXT params2 = (array) ( [ Vcalendar::ALTREP => (string) "<an alternate text representation, URI>"] [, Vcalendar::LANGUAGE => (string) "lang*"] *[, xparams ] ) xparams = (string) key => (string) value // key prefix "X-" lang* = as defined in [RFC5546] propOrderNo = (int) order number // opt, 1=1st, 2=2nd etc, PARTICIPANT only

Example

$vevent->setLocation( "Buckingham Palace" );


[index] [top] [up]

3.2.31 LOCATION-TYPE

LOCATION-TYPE specifies the type(s) of a location

As described in

rfc9073 "Event Publishing Extensions to iCalendar"
LOCATION-TYPE specifies the type(s) of a location and may occur once in VLOCATION and may NOT be supported by all calendaring software.

The value type is TEXT.

Values are taken from the values defined in Section 3 of rfc4589.

To ease up usage, constants Kigkonsult\Icalcreator\Vcalendar::LOCATION-TYPE is available.

For methods and formatting, explore the NAME property.


[index] [top] [up]

3.2.32 NAME

NAME specifies the name of the calendar.

Note, as described in

rfc7986 "iCalendar Property Extensions"
NAME may occur more than once in VCALENDAR and may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
NAME may occur once in VLOCATION and VRESOURCE and may NOT be supported by all calendaring software.

The value type is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::NAME
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create NAME

If set, returns [RFC7986] formatted string, otherwise empty string.

Format

Vcalendar::createDescription()

Example

$str = $calendar->createName();

Delete NAME

Remove NAME from calendar.

For NAME in VCALENDAR (may occur more than once), review CATEGORIES delete-method with "propOrderNo" argument.

Format

Vcalendar::deleteName()

Example

Delete (single/first) NAME property.

$calendar->deleteName();

Get ALL NAME

Returns array : all NAME, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllName( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get NAME

If set, returns property value(-s), otherwise bool false.

For NAME in VCALENDAR (may occur more than once), review CATEGORIES get-method with "propOrderNo" argument.

Format 1

Vcalendar::getName()

output = nameValue1

Format 2

Note details about property value/params.

Vcalendar::getName( true )

output = [ "value" => nameValue1, "params" => params2 ]

Example

$name = $calendar->getName();

is NAME set

Return bool true if NAME is set (i.e. non-empty).

Format

calendarComponent::isNameSet()

Example

$isPropSet = $vcalendar->isNameSet();

Set NAME

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC7986].

Format

Vcalendar::setName( nameValue [, params [, propOrderNo ]] )

nameValue1 = (string) Value type TEXT params2 = [ Vcalendar::ALTREP => (string) "<an alternate text representation, URI>", Vcalendar::LANGUAGE => (string) "lang*" ], *xparams lang* = as defined in [RFC5546] xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // opt, 1=1st, 2=2nd etc, VCALENDAR only

Example

$calendar->setName( "This is a name" );


[index] [top] [up]

3.2.33 ORGANIZER

The property defines the organizer for a calendar component and is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO, VJOURNAL and VFREEBUSY components.

Note, as described in

rfc7953 "New Properties for iCalendar"
ORGANIZER may occur once in VAVAILABILITY, may NOT be supported by all calendaring software.

This value type for ORGANIZER is URI, a calendar user address.

You can SORT calendar (components) on (asc) ORGANIZER values.

You can export calendar ORGANIZER values as vCards.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::ORGANIZER
- Kigkonsult\Icalcreator\Vcalendar::CN
- Kigkonsult\Icalcreator\Vcalendar::DIR
- Kigkonsult\Icalcreator\Vcalendar::SENT_BY
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create ORGANIZER

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createOrganizer()

Example

$str = $component->createOrganizer();

Delete ORGANIZER

Remove ORGANIZER from component.

Format

calendarComponent::deleteOrganizer()

Example

$vevent->deleteOrganizer();

Get ORGANIZER

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getOrganizer()

output = organizer1

Format 2

Note details about property value/params.

calendarComponent::getOrganizer( true )

output = [ "value" => organizer1, "params" => params2 ]

Example

$organizer = $vevent->getOrganizer();

is ORGANIZER set

Return bool true if ORGANIZER is set (i.e. non-empty).

Format

calendarComponent::isOrganizerSet()

Example

$isPropSet = $vevent->isOrganizerSet();

Set ORGANIZER

Set property value. Property value must be prefixed by protocol ("ftp://", "https://", "mailto:", "file://" etc, ref. rfc1738), "mailto:" is prefixed if missing. Also DIR parameter must be prefixed by protocol. SENT-BY parameter must use protocol "mailto:", prefixed if missing.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setOrganizer( organizer [, params] )

organizer1 = (string) a calendar user address (cal-address), a URI as defined by [RFC 1738] or any other IANA registered form for a URI. params2 = (array) Vcalendar::LANGUAGE => (string) "lang*", // applies to the CN parameter value Vcalendar::CN => (string) "common name to be associated with the calendar user specified by the property", Vcalendar::DIR => (string) "reference to a directory entry associated with the calendar user specified by the property", Vcalendar::SENT_BY => (string) (cal-address, above) "single calendar user that is acting on behalf of the calendar user specified by the property", *xparams xparams = (string) key => (string) value // key prefix "X-" lang* = as defined in [RFC5546]

Example

$dir = "ldap://domain.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)"; $vevent->setOrganizer( "ical@domain.com", [ Vcalendar::CN => "John Doe", Vcalendar::DIR => $dir, Vcalendar::SENT_BY => "secretary@domain.com", "X-Key1" => "X-Value1", "X-Key2" => "X-Value2" ] );


[index] [top] [up]

3.2.34 PARTICIPANT-TYPE

PARTICIPANT-TYPE specifies the type of participant.

As described in

rfc9073 "Event Publishing Extensions to iCalendar"
PARTICIPANT-TYPE specifies the type of participant and may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::PARTICIPANT_TYPE
- Kigkonsult\Icalcreator\Vcalendar::ACTIVE
- Kigkonsult\Icalcreator\Vcalendar::INACTIVE
- Kigkonsult\Icalcreator\Vcalendar::SPONSOR
- Kigkonsult\Icalcreator\Vcalendar::CONTACT
- Kigkonsult\Icalcreator\Vcalendar::BOOKING_CONTACT
- Kigkonsult\Icalcreator\Vcalendar::EMERGENCY_CONTACT
- Kigkonsult\Icalcreator\Vcalendar::PUBLICITY_CONTACT
- Kigkonsult\Icalcreator\Vcalendar::PLANNER_CONTACT
- Kigkonsult\Icalcreator\Vcalendar::PERFORMER
- Kigkonsult\Icalcreator\Vcalendar::SPEAKER
are available.

For methods and formatting, explore the CLASS property.


[index] [top] [up]

3.2.35 PERCENT-COMPLETE

This property is used by an assignee or delegatee of a VTODO to convey the percent completion of a VTODO to the Organizer and is OPTIONAL and MUST NOT occur more than once.

The property value is a positive integer between zero and one hundred. A value of "0" indicates the VTODO has not yet been started. A value of "100" indicates that the VTODO has been completed. Integer values in between indicate the percent partially complete.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::PERCENT_COMPLETE is available.

Create PERCENT-COMPLETE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createPercentComplete()

Example

$str = $component->createPercentComplete();

Delete PERCENT-COMPLETE

Remove PERCENT-COMPLETE from component.

Format

calendarComponent::deletePercentcomplete()

Example

$vtodo->deletePercentcomplete()

Get PERCENT-COMPLETE

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getPercentcomplete()

output = percent1

Format 2

Note details about property value/params.

calendarComponent::getPercentcomplete( true )

output = [ "value" => percent1, "params" => xparams2 ]

Example

$percent = $vtodo->getPercentcomplete();

is PERCENT-COMPLETE set

Return bool true if PERCENT-COMPLETE is set (i.e. non-empty).

Format

calendarComponent::isPercentcompleteSet()

Example

$isPropSet = $vtodo->isPercentcompleteSet();

Set PERCENT-COMPLETE

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty (non-zero) value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setPercentcomplete( percent [, xparams ] )

percent1 = (int) Value type INTEGER xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$vtodo->setPercentcomplete( 90 );


[index] [top] [up]

3.2.36 PRIORITY

The property defines the relative priority for a calendar component and is OPTIONAL and MUST NOT occur more than once in VEVENT and VTODO components.

Note, as described in

rfc7953 "New Properties for iCalendar"
PRIORITY may occur once in VAVAILABILITY, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
PRIORITY may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

The priority is specified as an integer in the range zero to nine.
A value of zero (US-ASCII decimal 48) specifies an undefined priority.
A value of one (US-ASCII decimal 49) is the highest priority.
A value of two (US-ASCII decimal 50) is the second highest priority.
Subsequent numbers specify a decreasing ordinal priority.
A value of nine (US-ASCII decimal 58) is the lowest priority.

You can SORT calendar (components) on (asc) PRIORITY values.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::PRIORITY is available.

Create PRIORITY

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createPriority()

Example

$str = $component->createPriority();

Delete PRIORITY

Remove PRIORITY from component.

Format

calendarComponent::deletePriority()

Example

$vevent->deletePriority();

Get PRIORITY

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getPriority()

output = priority1

Format 2

Note details about property value/params.

calendarComponent::getPriority( true )

output = [ "value" => priority1, "params" => xparams2 ]

Example

$priority = $vevent->getPriority();

is PRIORITY set

Return bool true if PRIORITY is set (i.e. non-empty).

Format

calendarComponent::isPrioritySet()

Example

$isPropSet = $vevent->isPrioritySet();

Set PRIORITY

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) and if value is not an integer.

Format

calendarComponent::setPriority( priority [, xparams ] )

priority1 = (int) Value type INTEGER xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$vevent->setPriority( 3 );


[index] [top] [up]

3.2.37 PROXIMITY

PROXIMITY indicates that a location-based trigger is applied to an VALARM

As described in

rfc9074 "VALARM Extensions for iCalendar"
PROXIMITY is OPTIONAL but MUST NOT occur more than once in VALARM and may NOT be supported by all calendaring software.
The VALARM subcomponent VLOCATION is OPTIONAL and MAY occur more than once but only when a PROXIMITY property is also present.

The value type is TEXT.

To ease up usage, constant
- Kigkonsult\Icalcreator\Vcalendar::PROXIMITY
- Kigkonsult\Icalcreator\Vcalendar::ARRIVE
- Kigkonsult\Icalcreator\Vcalendar::DEPART
- Kigkonsult\Icalcreator\Vcalendar::CONNECT
- Kigkonsult\Icalcreator\Vcalendar::DISCONNECT
are available.

For methods and formatting, explore the ACTION property, opt with usage of constants above


[index] [top] [up]

3.2.38 RDATE

This property defines the list of date/times for a recurrence set and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL, STANDARD and DAYLIGHT components.

Note, as described in

rfc7953 "New Properties for iCalendar"
RDATE may occur more than once in AVAILABLE
may NOT be supported by all calendaring software.

The default value type for RDATE is DATE-TIME, can be set to DATE or PERIOD (params2). In STANDARD and DAYLIGHT components, RDATE MUST be specified as a date-time value type with local time value.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::RDATE
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DATE
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
- Kigkonsult\Icalcreator\Vcalendar::PERIOD
are available.

Create RDATE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createRdate()

Example

$str = $component->createRdate();

Delete RDATE

Remove RDATE from component.

Format

calendarComponent::deleteRdate()

Example 1

Delete (single/first) RDATE property.

$vtodo->deleteRdate();

Example 2

Delete RDATE property no 2.

$vjournal->deleteRdate( 2 );

Example 3

Delete all RDATE properties.

while( $vjournal->deleteRdate()) { continue; }

Get ALL RDATE

Returns array : all RDATE, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllRdate( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get RDATE

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getRdate()

output = dates1

Format 2

Note details about property value/params.

calendarComponent::getRdate( propOrderNo/null , true )

propOrderNo = (int) specific property value

output = [ "value" => dates1, "params" => params2 ]

Format 3

calendarComponent::getRdate( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo RDATE

Example

$rdates = $vevent->getRdate();

is RDATE set

Return bool true if RDATE is set (i.e. non-empty).

Format

calendarComponent::isRdateSet()

Example

$isPropSet = $vevent->isRdateSet();

Set RDATE

Set property value.

The value type for RDATE should match the DTSTART value type.

If no "VALUE" value type is set, DATE-TIME (default) value type is set.

If no "TZID" is set in params and timezone in 1st date, all remaining dates are within this timezone and param "TZID" is set.

RDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).

A RDATE may contain a (comma separated) list of date values, BUT, a strong recommendation is to split a RDATE "list" into multiple single RDATE entries. (But if you do, don't mix timezones, may result in incorrect date values.)

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), Exception on DateTime/DateInterval error.

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setRdate( dates [, params [, propOrderNo ]] )

dates1 = singledate / (array) ( *singledate ) / (array) ( date2 *[, date2 ] ) date2 = (array) ( startdate, enddate/duration ) singledate = date startdate = date enddate = date date = (object) DateTimeInterface instance date = (string) date/datetime string* duration = (object) DateInterval class instance duration = (string) dur-value = ("+")"P"(dur-date/dur-time/dur-week) like "P15DT5H0M20S" dur-date = dur-day [dur-time] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-week = 1*DIGIT "W" dur-day = 1*DIGIT "D" dur-hour = 1*DIGIT "H" [dur-minute] dur-minute = 1*DIGIT "M" [dur-second] dur-second = 1*DIGIT "S" params2 = ([tzidparam ( / datetimeparam / dateparam / periodparam )] *[, xparams ] ) tzidparam = Vcalendar::TZID => (string) <timezone identifier> // output as local DATE-TIME with timezone identifier // if tzidparam="GMT"/"UTC" then // output date-time is suffixed by 'Z' datetimeparam = Vcalendar::VALUE => Vcalendar::DATE_TIME // default, DATE-TIME dateparam = Vcalendar::VALUE => Vcalendar::DATE // required if DATE periodparam = Vcalendar::VALUE => Vcalendar::PERIOD // required if PERIOD (datetime - datetime/duration) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc
* please notice date restraints.

Example

See rules in detail in RFC5545 "Internet Calendaring and Scheduling Core Object Specification (iCalendar)".

use Kigkonsult\Icalcreator\Vcalendar; try { $vevent = $vcalendar->newVevent() // one recurrence date, if param VALUE is missing, DATE-TIME default ->setRdate( new DateTime( "2001-01-01 01:01:01 UTC" ) ) // two or more recurrence dates ->setRdate( [ new DateTime( "2001-01-01 01:01:01 UTC" ) new DateTime( "2002-02-02 02:02:02 UTC" ) ] [ Vcalendar::VALUE => Vcalendar::DATE_TIME ] ) // one PERIOD, startdate-duration, VALUE "PERIOD" required ->setRdate( [ [ new DateTime( "2002-02-02 02:02:02 UTC" ), new DateInterval( "PT5H5M5S" ) ] ], [ Vcalendar::VALUE => Vcalendar::PERIOD ] ) // one PERIOD, start- and endDate (accepted format for ONE period) ->setRdate( [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ], [ Vcalendar::VALUE => Vcalendar::PERIOD ] ) // PERIOD, pairs of start- and endDates ->setRdate( [ [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ], [ "3 March 2003 03.03.03 UTC", new DateTime( "2004-04-04 04:04:04 UTC" ) ] ], [ Vcalendar::VALUE => Vcalendar::PERIOD ] ) // PERIOD, pairs of start-/enddate and startdate-duration ->setRdate( [ [ new DateTime( "2001-01-01 01:01:01 UTC" ), new DateTime( "2002-02-02 02:02:02 UTC" ) ], [ "3 March 2003 03.03.03 UTC", new DateInterval( "PT7H" ) ] ], [ Vcalendar::VALUE => Vcalendar::PERIOD ] ) // start- and enddate as DATE ->setRdate( [ [ new DateTime( "2005-10-05 05:05:05 UTC" ), "2008-08-08 08:08:08 UTC" ) ] ], [ Vcalendar::VALUE => Vcalendar::DATE ] ); } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.39 RECURRENCE-ID

This property is used in conjunction with the UID and SEQUENCE property to identify a specific instance of a recurring VEVENT, VTODO or VJOURNAL calendar component and is OPTIONAL and MAY NOT occur more than once.

rfc7953 "New Properties for iCalendar"
RECURRENCE-ID may occur once in AVAILABLE, may NOT be supported by all calendaring software.

The property value is the effective value of the DTSTART property of the recurrence instance. The default value type is DATE-TIME, can be set to DATE (params2).

For methods and formatting, explore the DTEND property.

The calendar method SORT with argument UID also use RECURRENCE-ID / SEQUENCE as sort parameters.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::RECURRENCE_ID
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DATE
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
- Kigkonsult\Icalcreator\Vcalendar::TZID
are available.


[index] [top] [up]

3.2.40 REFRESH-INTERVAL

REFRESH-INTERVAL specifies a suggested minimum interval for polling for changes of the calendar data from the original source of that data.

Note, as described in

rfc7986 "iCalendar Property Extensions"
REFRESH-INTERVAL may occur once in VCALENDAR and may NOT be supported by all calendaring software.

The value type is DURATION.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::REFRESH_INTERVAL is available.

For methods and usage, see 3.2.23 DURATION but applied on a Vcalendar instance.


[index] [top] [up]

3.2.41 RELATED-TO

The property is used to represent a relationship or reference between one calendar component and another and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL and VALARM (rfc9074) components.

Note, as described in

rfc9073 "Event Publishing Extensions to iCalendar"
RELATED-TO may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

The property value consists of the persistent, globally unique identifier of another calendar component. This value would be represented in a calendar component by the UID property.

The value type for RELATED-TO is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::RELATED_TO
- Kigkonsult\Icalcreator\Vcalendar::RELTYPE
- Kigkonsult\Icalcreator\Vcalendar::PARENT
- Kigkonsult\Icalcreator\Vcalendar::CHILD
- Kigkonsult\Icalcreator\Vcalendar::SIBLING
- available.

Create RELATED-TO

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createRelatedTo()

Example

$str = $component->createRelatedTo();

Delete RELATED-TO

Remove RELATED-TO from component.

Format

calendarComponent::deleteRelatedto()

Example 1

Delete /single/first) RELATED-TO property

$vtodo->deleteRelatedto()

Example 2

Delete RELATED-TO property no 2.

$vjournal->deleteRelatedto( 2 );

Example 3

Deleting all RELATED-TO properties.

while( $vjournal->deleteRelatedto()) { continue; }

Get ALL RELATED-TO

Returns array : all RELATED-TO, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllRelatedto( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get RELATED-TO

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getRelatedto()

output = relid1

Format 2

Note details about property value/params.

calendarComponent::getRelatedto( propOrderNo/null , true )

propOrderNo = (int) specific property value

output = [ "value" => relid1, "params" => params2 ]

Format 3

calendarComponent::getRelatedto(propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo RELATED-TO

Example

$relatedId = $vtodo->getRelatedto();

is RELATED-TO set

Return bool true if RELATED-TO is set (i.e. non-empty).

Format

calendarComponent::isRelatedtoSet()

Example

$isPropSet = $vevent->isRelatedtoSet();

Set RELATED-TO

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Set property value.

The method returns the class instance (static).

Format

calendarComponent::setRelatedto( relid [, params [, propOrderNo ]] )

relid1 = (string) Value type TEXT. params2 = (array) ( [ reltype ] *[, xparams] ) reltype = Vcalendar::RELTYPE => Vcalendar::PARENT (Default) / Vcalendar::CHILD / Vcalendar::SIBLING / (string) iana-token / (string) x-name xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc

Example

$vtodo->setRelatedto( "19960401-080045-4000F192713@host.com" );


[index] [top] [up]

3.2.42 REPEAT

This property defines the number of time the ALARM should be repeated, after the initial trigger. If the ALARM triggers more than once, then this property MUST be specified along with the DURATION property.

The value type for REPEAT is INTEGER.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::REPEAT is available.

Create REPEAT

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createRepeat()

Example

$str = $component->createRepeat();

Delete REPEAT

Remove REPEAT from component.

Format

calendarComponent::deleteRepeat()

Example

$valarm->deleteRepeat();

Get REPEAT

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getRepeat()

output = repeatTimes1

Format 2

Note details about property value/params.

calendarComponent::getRepeat( true )

output = [ "value" => repeatTimes1, "params" => xparams2 ]

Example

$repeat = $valarm->getRepeat();

is REPEAT set

Return bool true if REPEAT is set (i.e. non-empty).

Format

calendarComponent::isRepeatSet()

Example

$isPropSet = $valarm->isRepeatSet();

Set REPEAT

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) and if value is not an integer.

Format

calendarComponent::setRepeat( , repeatTimes [, xparams ] )

repeatTimes1 = (int) Value type INTEGER xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$valarm->setRepeat( 2 );


[index] [top] [up]

3.2.43 REQUEST-STATUS

This property defines the status code returned for a scheduling request and is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL and VFREEBUSY components.

Note, as described in

rfc9073 "Event Publishing Extensions to iCalendar"
REQUEST-STATUS may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for REQUEST-STATUS is TEXT and consists of

a short return status component,
(in output) a PERIOD character separated 3-tuple of integers, ex 3.11
a longer return status description component
optionally a statusspecific data component

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::REQUEST_STATUS
- Kigkonsult\Icalcreator\Vcalendar::STATCODE
- Kigkonsult\Icalcreator\Vcalendar::STATDESC
- Kigkonsult\Icalcreator\Vcalendar::EXTDATA
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create REQUEST-STATUS

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createRequestStatus()

Example

$str = $component->createRequestStatus();

Delete REQUEST-STATUS

Remove REQUEST-STATUS from component.

Format

calendarComponent::deleteRequeststatus()

Example 1

Delete (single/first) REQUEST-STATUS property.

$vtodo->deleteRequeststatus();

Example 2

Delete REQUEST-STATUS property no 2.

$vjournal->deleteRequeststatus( 2 );

Example 3

Deleting all REQUEST-STATUS properties.

while( $vjournal->deleteRequeststatus()) { continue; }

Get ALL REQUEST-STATUS

Returns array : all REQUEST-STATUS, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllRequeststatus( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get REQUEST-STATUS

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getRequeststatus()

output = [ Vcalendar::STATCODE => statcode1, Vcalendar::STATDESC => statdesc2, Vcalendar::EXTDATA => extdata3 // opt ]

Format 2

Note details about property value/params.

calendarComponent::getRequeststatus( propOrderNo/null, true )

propOrderNo = (int) specific property value

output = [ "value" => [ Vcalendar::STATDESC => statcode1, Vcalendar::STATDESC => errtext2, Vcalendar::EXTDATA => extdata3 // opt ), "params" => params4 ]

Format 3

calendarComponent::getRequeststatus( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo REQUEST-STATUS

Example

$requestStatus = $vtodo->getRequeststatus();

is REQUEST-STATUS set

Return bool true if REQUEST-STATUS is set (i.e. non-empty).

Format

calendarComponent::isRequeststatusSet()

Example

$isPropSet = $vevent->isRequeststatusSet();

Set REQUEST-STATUS

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setRequeststatus( statcode1, statdesc2 [,extdata3 [,params4 [,propOrderNo]]] )

statcode1 = Hierarchical, numeric return status code (1*DIGIT "." 1*DIGIT 1*DIGIT) statdesc2 = (string) Textual status description extdata3 = (string) Textual exception data. For example, the offending property name and value or complete property line. params4 = (array) ( Vcalendar::LANGUAGE => (string) "lang*"] *xparams ) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

Example

$vfreebusy->setRequeststatus( 2.00, "Invalid property value", "DTSTART:96-Apr-31" );


[index] [top] [up]

3.2.44 RESOURCE-TYPE

RESOURCE-TYPE specifies the type of resource

As described in

rfc9073 "Event Publishing Extensions to iCalendar"
RESOURCE-TYPE specifies the type of participant and may occur once in VRESOURCE and may NOT be supported by all calendaring software.

The value type is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::RESOURCE
- Kigkonsult\Icalcreator\Vcalendar::ROOM
- Kigkonsult\Icalcreator\Vcalendar::PROJECTOR
- Kigkonsult\Icalcreator\Vcalendar::REMOTE_CONFERENCE_AUDIO
- Kigkonsult\Icalcreator\Vcalendar::REMOTE_CONFERENCE_VIDEOSPEAKER
are available.

For methods and formatting, explore the CLASS property.


[index] [top] [up]

3.2.45 RESOURCES

This property defines the equipment or resources anticipated for an activity specified by a calendar entity and is OPTIONAL and MAY occur more than once in VEVENT and VTODO components.

Note, as described in

rfc9073 "Event Publishing Extensions to iCalendar"
RESOURCES may occur more than once in PARTICIPANT and may NOT be supported by all calendaring software.

the VCALENDAR / VEVENT / VTODO method vresourceNames2Resources()
may be used to create new RESOURCES from VRESOURCE (sub-)components and the NAME property value with X-parameters for VRESOURCE properties UID and RESOURCE-TYPE.
Another option is to set RESOURCES and VRESOURCE in pairs.

The value type for RESOURCES is TEXT.

You can SORT calendar (components) on (asc) RESOURCES values.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::RESOURCES
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create RESOURCES

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createResources()

Example

$str = $component->createResources();

Delete RESOURCES

Remove RESOURCES from component.

Format

calendarComponent::deleteResources()

Example 1

Delete (single/first) RESOURCES property.

$vevent->deleteResources();

Example 2

Delete RESOURCES property no 2.

$vevent->deleteResources( 2 );

Example 3

Delete all RESOURCES properties.

while( $vevent->deleteResources()) { continue; }

Get ALL RESOURCES

Returns array : all RESOURCES, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllResources( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get RESOURCES

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getResources()

output = resources1

Format 2

Note details about property value/params.

calendarComponent::getResources( propOrderNo/null, true )

propOrderNo = (int) specific property value

output = [ "value" => resources1, "params" => params2 ]

Format 3

calendarComponent::getResources( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo RESOURCES

Example

$resources = $vtodo->getResources();

is RESOURCES set

Return bool true if RESOURCES is set (i.e. non-empty).

Format

calendarComponent::isResourcesSet()

Example

$isPropSet = $vevent->isResourcesSet();

Set RESOURCES

Set property value.

In spite of the fact that RESOURCES may contain a (comma separated) list of values, a strong recommendation is to split a RESOURCES "list" into multiple single RESOURCES entries.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setResources( resources [, params [, propOrderNo ]] )

resources1 = (string) textual resources or subtypes of the calendar component, can be specified as a list of resources separated by the COMMA character. params2 = (array) ( Vcalendar::ALTREP => (string) "<an alternate text representation, URI>", Vcalendar::LANGUAGE => (string) "lang*", *xparams ) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

Example

$vevent->setResources( "COMPUTER PROJECTOR" );


[index] [top] [up]

3.2.46 RRULE

This property defines a rule or repeating pattern for recurring EVENTs, TODOs, STANDARD or DAYLIGHT definitions and is OPTIONAL and MAY occur more than once ([RFC2445]), SHOULD NOT occur more than once ([RFC5545]). iCalcreator allows only one in component.

Note, as described in

rfc7953 "New Properties for iCalendar"
RRULE may occur once in AVAILABLE, may NOT be supported by all calendaring software.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::RRULE
- Kigkonsult\Icalcreator\Vcalendar::EXRULE
- Kigkonsult\Icalcreator\Vcalendar::FREQ
- Kigkonsult\Icalcreator\Vcalendar::UNTIL
- Kigkonsult\Icalcreator\Vcalendar::COUNT
- Kigkonsult\Icalcreator\Vcalendar::INTERVAL
- Kigkonsult\Icalcreator\Vcalendar::BYSECOND
- Kigkonsult\Icalcreator\Vcalendar::BYMINUTE
- Kigkonsult\Icalcreator\Vcalendar::BYHOUR
- Kigkonsult\Icalcreator\Vcalendar::BYDAY
- Kigkonsult\Icalcreator\Vcalendar::BYMONTHDAY
- Kigkonsult\Icalcreator\Vcalendar::BYYEARDAY
- Kigkonsult\Icalcreator\Vcalendar::BYWEEKNO
- Kigkonsult\Icalcreator\Vcalendar::BYMONTH
- Kigkonsult\Icalcreator\Vcalendar::BYSETPOS
- Kigkonsult\Icalcreator\Vcalendar::WKST
- Kigkonsult\Icalcreator\Vcalendar::SECONDLY
- Kigkonsult\Icalcreator\Vcalendar::MINUTELY
- Kigkonsult\Icalcreator\Vcalendar::HOURLY
- Kigkonsult\Icalcreator\Vcalendar::DAILY
- Kigkonsult\Icalcreator\Vcalendar::WEEKLY
- Kigkonsult\Icalcreator\Vcalendar::MONTHLY
- Kigkonsult\Icalcreator\Vcalendar::YEARLY
- Kigkonsult\Icalcreator\Vcalendar::DAY
- Kigkonsult\Icalcreator\Vcalendar::SU
- Kigkonsult\Icalcreator\Vcalendar::MO
- Kigkonsult\Icalcreator\Vcalendar::TU
- Kigkonsult\Icalcreator\Vcalendar::WE
- Kigkonsult\Icalcreator\Vcalendar::TH
- Kigkonsult\Icalcreator\Vcalendar::FR
- Kigkonsult\Icalcreator\Vcalendar::SA
are available.

Create RRULE

If set, returns iCal formatted string, otherwise empty string.

Format

calendarComponent::createRrule()

Example

$str = $component->createRrule();

Delete RRULE

Remove RRULE from component.

Format

calendarComponent::deleteRrule()

Example 1

Delete (single/first) RRULE property.

$vevent->deleteRrule();

Example 2

Delete RRULE property no 2.

$vevent->deleteRrule( 2 );

Example 3

Delete all RRULE properties.

while( $vevent->deleteRrule()) { continue; }

Get RRULE

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getRrule()

output = recur1

Format 2

Note details about property value/params.

calendarComponent::getRrule( true )

output = [ "value" => recur1, "params" => xparams2 ]

Example

$rrules = $vtodo->getRrule();

is RRULE set

Return bool true if RRULE is set (i.e. non-empty).

Format

calendarComponent::isRruleSet()

Example

$isPropSet = $vevent->isRruleSet();

Set RRULE

Set property single value, "RECUR", multiple values not allowed.

The "RECUR" property SHOULD NOT occur more than once in a component.

The method returns the class instance (static).

The method throws

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setRrule( recur [, xparams [, propOrderNo ]] )

See rules in detail in RFC5545 "Internet Calendaring and Scheduling Core Object Specification (iCalendar)".

recur1 = (array) ( Vcalendar::FREQ => freq, // either UNTIL or COUNT may appear in a "recur", but UNTIL and COUNT MUST NOT occur in the same "recur" Vcalendar::UNTIL "=>" >enddate, Vcalendar::COUNT "=>" 1*DIGIT, // the rest of these keywords are optional, but MUST NOT occur more than once Vcalendar::INTERVAL "=>" 1*DIGIT, Vcalendar::BYSECOND "=>" byseclist, Vcalendar::BYMINUTE "=>" byminlist, Vcalendar::BYHOUR "=>" byhrlist, Vcalendar::BYDAY "=>" bywdaylist, Vcalendar::BYMONTHDAY "=>" bymodaylist, Vcalendar::BYYEARDAY "=>" byyrdaylist, Vcalendar::BYWEEKNO "=>" bywknolist, Vcalendar::BYMONTH "=>" bymolist, Vcalendar::BYSETPOS "=>" bysplist, Vcalendar::WKST "=>" weekday ] x-name "=>" (string) text ] ) freq = Vcalendar::SECONDLY" / Vcalendar::MINUTELY / Vcalendar::HOURLY / Vcalendar::DAILY / Vcalendar::WEEKLY / Vcalendar::MONTHLY / Vcalendar::YEARLY enddate = date // a DATE value or a UTC timezone DATE-TIME value date = (object) DateTimeInterface instance, will be set to UTC if not UTC timezone date = (string) date/datetime string* byseclist = seconds byseclist = (array) (seconds *(, seconds )) seconds = 1DIGIT / 2DIGIT ;0 to 59 byminlist = minutes byminlist = (array) ( minutes *(, minutes )) minutes = 1DIGIT / 2DIGIT ;0 to 59 byhrlist = hour byhrlist = (array) ( hour *(, hour )) hour = 1DIGIT / 2DIGIT ;0 to 23 bywdaylist = weekdaynum bywdaylist = (array) ( weekdaynum *("," weekdaynum )) weekdaynum = (array) ( [([plus] ordwk / minus ordwk)], "DAY" => weekday ) plus = "+" minus = "-" ordwk = 1DIGIT / 2DIGIT ;1 to 53 // Vcalander::SU etc available weekday = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA" ; Corresponding to ; SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, ; FRIDAY and SATURDAY days of the week. bymodaylist = monthdaynum bymodaylist = (array) ( monthdaynum *(, monthdaynum )) monthdaynum = ( [plus] ordmoday ) / ( minus ordmoday ) ordmoday = 1DIGIT / 2DIGIT ;1 to 31 byyrdaylist = yeardaynum byyrdaylist = (array) ( yeardaynum *(, yeardaynum )) yeardaynum = ( [plus] ordyrday ) / ( minus ordyrday ) ordyrday = 1DIGIT / 2DIGIT / 3DIGIT ;1 to 366 bywknolist = weeknum bywknolist = (array) ( weeknum *(, weeknum )) weeknum = ( [plus] ordwk ) / ( minus ordwk ) bymolist = monthnum bymolist = (array) ( monthnum *(, monthnum )) monthnum = 1DIGIT / 2DIGIT ;1 to 12 bysplist = setposday bysplist = (array) ( setposday *(, setposday )) setposday = yeardaynum xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc
* please notice date restraints.

Example

try { $vevent->setRrule( [ Vcalendar::FREQ => Vcalendar::MONTHLY, Vcalendar::UNTIL => new DateTime( "20060831" ), // DATE, if DATE-TIME, UTC timezone Vcalendar::INTERVAL => 2, Vcalendar::WKST => Vcalendar::SU, Vcalendar::BYSECOND => 2, Vcalendar::BYMINUTE => [ 2, -4, 6 ], // (*) Vcalendar::BYHOUR => [ 2, 4, -6 ], // (*) Vcalendar::BYMONTHDAY => -2, // (*) Vcalendar::BYYEARDAY => 2, // (*) Vcalendar::BYWEEKNO => [ 2, -4, 6 ], // (*) Vcalendar::BYMONTH => 2, // (*) Vcalendar::BYSETPOS => [ 2, -4, 6 [, // (*) Vcalendar::BYDAY => [ // [ -1, Vcalendar::DAY => Vcalendar::WE ], // last WE [ 3, Vcalendar::DAY => Vcalendar::TH ], // third TH [ 5, Vcalendar::DAY => Vcalendar::FR ], // fifth FR [ Vcalendar::DAY => Vcalendar::MO ] // every MO ], [ "x-key" => "xparamValue" ] ); } catch( Exception $e ) { die( $e->getMessage()); } $vtodo->setRrule( [ Vcalendar::FREQ => Vcalendar::WEEKLY, Vcalendar::COUNT => 2, Vcalendar::INTERVAL => 2, Vcalendar::WKST => Vcalendar::SU, Vcalendar::BYSECOND => [ -2, 4, 6 ], // (*) Vcalendar::BYMINUTE => -2, // (*) Vcalendar::BYHOUR => 2, // (*) Vcalendar::BYMONTHDAY => [ 2, -4, 6 ], // (*) Vcalendar::BYYEARDAY => [ -2, 4, 6 ], // (*) Vcalendar::BYWEEKNO => -2, // (*) Vcalendar::BYMONTH => [ 2, 4, -6 ], // (*) Vcalendar::BYSETPOS => -2, // (*) // Vcalendar::BYday => Vcalendar::WE // one day // Vcalendar::BYday => [ Vcalendar::WE, Vcalendar::TH ], // days Vcalendar::BYday => [ 5, Vcalendar::DAY => Vcalendar::WE ], // pos. day ], [ "x-key" => "xparamValue" ] ); // (*) single value/array of values


[index] [top] [up]

3.2.47 SEQUENCE

This property defines the revision sequence number of the calendar component within a sequence of revisions. The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO and VJOURNAL components.

Note, as described in

rfc7953 "New Properties for iCalendar"
SEQUENCE may occur once in VAVAILABILITY, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
SEQUENCE may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

It is monotonically incremented by the ORGANIZER's CUA (Calendar User Agent) each time the ORGANIZER makes a significant revision to the calendar component.

When the ORGANIZER makes changes to one of the following properties, the sequence number MUST be incremented: DTSTART, DTEND, DUE, RDATE, RRULE, EXDATE, EXRULE, STATUS. In addition, changes made by the ORGANIZER to other properties can also force the sequence number to be incremented. The ORGANIZER CUA MUST increment the sequence number when ever it makes changes to properties in the calendar component that the ORGANIZER deems will jeopardize the validity of the participation status of the Attendees. For example, changing the location of a meeting from one locale to another distant locale could effectively impact the participation status of the Attendees.

The value type of SEQUENCE is INTEGER.

The calendar method SORT with argument UID also use RECURRENCE-ID / SEQUENCE as sort parameters.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::SEQUENCE is available.

Create SEQUENCE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createSequence()

Example

$str = $component->createSequence();

Delete SEQUENCE

Remove SEQUENCE from component.

Format

calendarComponent::deleteSequence()

Example

$vtodo->deleteSequence();

Get SEQUENCE

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getSequence()

output = sequence1

Format 2

Note details about property value/params.

calendarComponent::getSequence( true )

output = [ "value" => sequence1, "params" => xparams2 ]

Example

$sequence = $vtodo->getSequence();

is SEQUENCE set

Return bool true if SEQUENCE is set (i.e. non-empty).

Format

calendarComponent::isSequenceSet()

Example

$isPropSet = $vevent->isSequenceSet();

Set SEQUENCE

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) and if value is not an integer.

Format

calendarComponent::setSequence( [, sequence [, xparams ]] )

sequence1 = (int) Value type INTEGER xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example 1

$vevent->setSequence( 2 ); // set sequence number to 2

Example 2

$vevent->setSequence(); // force sequence number to be set to 0 // or, if sequence exists, incremented by 1


[index] [top] [up]

3.2.48 SOURCE

SOURCE identifies a URI where calendar data can be refreshed from

Note, as described in

rfc7986 "iCalendar Property Extensions"
SOURCE may occur once in VCALENDAR and may NOT be supported by all calendaring software.

The value type is URI.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::SOURCE is available.

Create SOURCE

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

Vcalendar::createSource()

Example

$str = $component->createSource();

Delete SOURCE

Remove URL from Vcalendar.

Format

Vcalendar::deleteSource()

Example

$calendar->deleteSource();

Get SOURCE

If set, returns property value, otherwise bool false.

Format 1

Vcalendar::getSource()

output = url1

Format 2

Note details about property value/params.

Vcalendar::getSource( true )

output = [ "value" => source1, "params" => xparams2 ]

Example

$url = $calendar->getSource();

is SOURCE set

Return bool true if SOURCE is set (i.e. non-empty).

Format

calendarComponent::isSourceSet()

Example

$isPropSet = $vcalendar->isSourceSet();

Set SOURCE

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), InvalidArgumentException on url error.

Format

Vcalendar::setSource( source [, xparams ] )

source1 = (string) Value type URI xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

try { $calendar->setSource( "https://www.icaldomain.net&q=1" ); } catch( InvalidArgumentException $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.49 STATUS

This property defines the overall status or confirmation for the calendar component. The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO and VJOURNAL components.

Note, as described in

rfc9073 "Event Publishing Extensions to iCalendar"
STATUS may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

You can SORT calendar (components) on (asc) STATUS values.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::STATUS
- Kigkonsult\Icalcreator\Vcalendar::COMPLETED
- Kigkonsult\Icalcreator\Vcalendar::CANCELLED
- Kigkonsult\Icalcreator\Vcalendar::CONFIRMED
- Kigkonsult\Icalcreator\Vcalendar::DRAFT
- Kigkonsult\Icalcreator\Vcalendar::F_NAL // note FINAL
- Kigkonsult\Icalcreator\Vcalendar::IN_PROCESS
- Kigkonsult\Icalcreator\Vcalendar::NEEDS_ACTION
- Kigkonsult\Icalcreator\Vcalendar::TENTATIVE
are available.

Create STATUS

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createStatus()

Example

$str = $component->createStatus();

Delete STATUS

Remove STATUS from component.

Format

calendarComponent::deleteStatus()

Example

$vtodo->deleteStatus();

Get STATUS

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getStatus()

output = status1

Format 2

Note details about property value/params.

calendarComponent::getStatus( true )

output = [ "value" => status1, "params" => xparams2 ]

Example

$status = $vtodo->getStatus();

is STATUS set

Return bool true if STATUS is set (i.e. non-empty).

Format

calendarComponent::isStatusSet()

Example

$isPropSet = $vevent->isStatusSet();

Set STATUS

Set property value.

The method throws InvalidArgumentException on
- empty value and config ALLOWEMPTY is set to false (default true),
- invalid value (below).

Format

calendarComponent::setStatus( status [, xparams ] )

// Status values for a VEVENT status1 = Vcalendar::TENTATIVE // Indicates event is tentative / Vcalendar::CONFIRMED // Indicates event is definite / Vcalendar::CANCELLED // Indicates event was cancelled // Status values for VTODO status1 = Vcalendar::NEEDS_ACTION // Indicates to-do needs action / Vcalendar::COMPLETED // Indicates to-do completed / Vcalendar::IN_PROCESS // Indicates to-do in process of / Vcalendar::CANCELLED // Indicates to-do was cancelled // Status values for VJOURNAL status1 = Vcalendar::DRAFT // Indicates journal is draft / Vcalendar::F_NAL; // Indicates journal is final / Vcalendar::CANCELLED // Indicates journal is removed xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$vevent->setStatus( "COMPLETED" );


[index] [top] [up]

3.2.50 STRUCTURED-DATA

STRUCTURED-DATA specifies ancillary data associated with the calendar component

As described in

rfc9073 "Event Publishing Extensions to iCalendar"
STRUCTURED-DATA is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL, PARTICIPANT, VLOCATION and VRESOURCE
and may NOT be supported by all calendaring software.

The value type is TEXT, BINARY, or URI.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::STRUCTURED_DATA
- Kigkonsult\Icalcreator\Vcalendar::BASE64
- Kigkonsult\Icalcreator\Vcalendar::BINARY
- Kigkonsult\Icalcreator\Vcalendar::ENCODING
- Kigkonsult\Icalcreator\Vcalendar::FMTTYPE
- Kigkonsult\Icalcreator\Vcalendar::TEXT
- Kigkonsult\Icalcreator\Vcalendar::URI
are available.

Create STRUCTURED-DATA

If set, returns [RFC9073] formatted string, otherwise empty string.

Format

calendarComponent::createStructureddata()

Example

$str = $component->createStructureddata();

Delete STRUCTURED-DATA

Remove STRUCTURED-DATA from component.

Format

calendarComponent::deleteStructureddata()

Example 1

$vevent->deleteStructureddata();

Example 2

Delete STRUCTURED-DATA property no 2.

$vevent->deleteStructureddata( 2 );

Example 3

Deleting all STRUCTURED-DATA properties.

while( $vevent->deleteStructureddata()) { continue; }

Get ALL STRUCTURED-DATA

Returns array : all STRUCTURED-DATA, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllStructureddata( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get STRUCTURED-DATA

If set, returns property value(-s), otherwise bool false.

Format 1

calendarComponent::getStructureddata()

output = structureddataValue

Format 2

Note details about property value/params.

calendarComponent::getStructureddata( propOrderNo/null , true )

propOrderNo = (int) specific property value,

output = [ "value" => structureddataValue, "params" => params ]

Format 3

calendarComponent::getStructureddata( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo ATTACH

Example

$structureddata = $vevent->getStructureddata();

is STRUCTURED-DATA set

Return bool true if STRUCTURED-DATA is set (i.e. non-empty).

Format

calendarComponent::isStructureddataSet()

Example

$isPropSet = $vevent->isStructureddataSet();

Set STRUCTURED-DATA

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setStructureddata( structureddataValue [, params [, propOrderNo ]] )

structureddataValue = (string) TEXT/ URI / inline BINARY encoded content params = [ "VALUE" => "TEXT" ] / [ "VALUE" => "BINARY", "ENCODING" => "BASE64" ] / [ "VALUE" => "URI" ] [, "FMTTYPE" => contentType ] // opt. for URI, req. otherwise [, "SCHEMAE" => schema ] // opt. for URI, req. otherwise *[, xparams ] ) contentType = (string) The parameter value MUST be the TEXT for either an IANA registered content type or a non-standard content type. schema = "uri" xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc

Example

$vevent->setStructureddata( "https://dir.example.com/vcard/aviolinist.vcf", [ Vcalendar::VALUE => Vcalendar::URI ] );


[index] [top] [up]

3.2.51 STYLED-DESCRIPTION

STYLED-DESCRIPTION provides for one or more rich-text descriptions to replace that provided by the "DESCRIPTION" property.

As described in

rfc9073 "Event Publishing Extensions to iCalendar"
STYLED-DESCRIPTION is OPTIONAL and MAY occur more than once in VEVENT, VTODO, VJOURNAL, VFREEBUSY, PARTICIPANT and VALARM
and may NOT be supported by all calendaring software.

The value type can be set to TEXT or URI but no default.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::STYLED_DESCRIPTION
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::DERIVED
- Kigkonsult\Icalcreator\Vcalendar::FMTTYPE
- Kigkonsult\Icalcreator\Vcalendar::LANG
- Kigkonsult\Icalcreator\Vcalendar::TEXT
- Kigkonsult\Icalcreator\Vcalendar::URI
are available.

Create STYLED-DESCRIPTION

If set, returns [RFC9073] formatted string, otherwise empty string.

Format

calendarComponent::createStyleddescription()

Example

$str = $component->createStyleddescription();

Delete STYLED-DESCRIPTION

Remove STYLED-DESCRIPTION from component.

Format

calendarComponent::deleteStyleddescription()

Example 1

$vevent->deleteStyleddescription();

Example 2

Delete STYLED-DESCRIPTION property no 2.

$vevent->deleteStyleddescription( 2 );

Example 3

Deleting all STYLED-DESCRIPTION properties.

while( $vevent->deleteStyleddescription()) { continue; }

Get ALL STYLED-DESCRIPTION

Returns array : all STYLED-DESCRIPTION, value/params OR only values

Note details about property value/params.

Format

calendarComponent::getAllStyleddescription( [ valueOnly ] )

valueOnly = (bool) default false, value/params OR only values (true)

Get STYLED-DESCRIPTION

If set, returns property value(-s), otherwise bool false.

Format 1

calendarComponent::getStyleddescription()

output = styleddescriptionValue

Format 2

Note details about property value/params.

calendarComponent::getStyleddescription( propOrderNo/null , true )

propOrderNo = (int) specific property value,

output = [ "value" => styleddescriptionValue, "params" => params ]

Format 3

calendarComponent::getStyleddescription( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo ATTACH

Example

$structureddata = $vevent->getStyleddescription();

is STYLED-DESCRIPTION set

Return bool true if STYLED-DESCRIPTION is set (i.e. non-empty).

Format

calendarComponent::isStyleddescriptionSet()

Example

$isPropSet = $vevent->isStyleddescriptionSet();

Set STYLED-DESCRIPTION

Set property value.

The method returns the class instance (static).

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setStyleddescription( tyleddescriptionValue [, params [, propOrderNo ]] )

styleddescriptionValue = (string) TEXT/ URI / inline BINARY encoded content params = [ "VALUE" => "TEXT" ] / [ "VALUE" => "URI" ] [, "ALTREP" => altrep ] // optional [, "LANG" => lang ] // optional [, "FMTTYPE" => contentType ] // optional [, "DERIVED" => derived ] // optional *[, xparams ] ) altrep = (string) an alternate text representation, URI lang = (string) as defined in [RFC5546] contentType = (string) The parameter value MUST be the TEXT for either an IANA registered content type or a non-standard content type. derived = "true" / "false" default is false xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc

Examples

$vevent->setStyleddescription( "<html>...</html>", [ Vcalendar::FMTTYPE => "text/html;" ] );

$vevent->setStyleddescription( "https://example.org/desc001.html", [ Vcalendar::VALUE => Vcalendar::URI ] );


[index] [top] [up]

3.2.52 SUMMARY

This property defines a short ("one line") summary or subject for the calendar component. (In "[RFC5545], Recommended Practices", up to 255 characters) (, analogous to a mail SUBJECT). The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO and VJOURNAL components. The property is REQUIRED and MUST occur once in VALARM (EMAIL) calendar component.

Note, as described in

rfc7953 "New Properties for iCalendar"
SUMMARY may occur once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
SUMMARY may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type for SUMMARY is TEXT.

You can SORT calendar (components) on (asc) SUMMARY values.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::SUMMARY
- Kigkonsult\Icalcreator\Vcalendar::ALTREP
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create SUMMARY

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createSummary()

Example

$str = $component->createSummary();

Delete SUMMARY

Remove SUMMARY from component.

Format

calendarComponent::deleteSummary()

Example

$vevent->deleteSummar();

Get SUMMARY

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getSummary()

output = summary1

Format 2

Note details about property value/params.

calendarComponent::getSummary( true )

output = [ "value" => summary1, "params" => params2 ]

Example

$summary = $vtodo->getSummary();

is SUMMARY set

Return bool true if SUMMARY is set (i.e. non-empty).

Format

calendarComponent::isSummarySet()

Example

$isPropSet = $vevent->isSummarySet();

Set SUMMARY

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Parameters will be ordered as prescribed in [RFC5545].

Format

calendarComponent::setSummary( summary [, params ] )

summary1 = (string) Value type TEXT, a short, one line summary about the activity or journal entry. params2 = array( Vcalendar::ALTREP => (string) "<an alternate text representation, URI>", Vcalendar::LANGUAGE => (string) "lang*", *xparams ) xparams = (string) key => (string) value // key prefix "X-" lang* = as defined in [RFC5546]

Example

$vevent->setSummary( "This is a summary" );


[index] [top] [up]

3.2.53 TRANSP

This property defines whether an EVENT is transparent or not to busy time searches and is OPTIONAL and MUST NOT occur more than once.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::TRANSP
- Kigkonsult\Icalcreator\Vcalendar::OPAQUE
- Kigkonsult\Icalcreator\Vcalendar::TRANSPARENT
are available.

Create TRANSP

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createTransp()

Example

$str = $component->createTransp();

Delete TRANSP

Remove TRANSP from component.

Format

calendarComponent::deleteTransp()

Example

$vevent->deleteTransp();

Get TRANSP

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getTransp( )

output = transp1

Format 2

Note details about property value/params.

calendarComponent::getTransp( true )

output = [ "value" => transp1, "params" => xparams2 ]

Example

$transp = $vtodo->getTransp();

is TRANSP set

Return bool true if TRANSP is set (i.e. non-empty).

Format

calendarComponent::isTranspSet()

Example

$isPropSet = $vevent->isTranspSet();

Set TRANSP

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

calendarComponent::setTransp( transp [, xparams ] )

transp1 = Vcalendar::OPAQUE / Vcalendar::TRANSPARENT xparams2 = (array) *( (string) key => (string) value ) // key prefix "X-"

Example

$vevent->setTransp( "TRANSPARENT" );


[index] [top] [up]

3.2.54 TRIGGER

This property specifies when an ALARM will trigger and is REQUIRED and MUST NOT occur more than once.

Note, as described in

rfc9074 "VALARM Extensions for iCalendar"
Typically, when a PROXIMITY property is used, there is no need to specify a time-based trigger using the TRIGGER property. However, since TRIGGER is defined as a required property for a VALARM component, for backwards compatibility, it has to be present but ignored. To indicate a TRIGGER that is to be ignored, clients SHOULD use a value a long time in the past. A value of "19760401T005545Z" has been commonly used for this purpose.

The default value type is DURATION. The value type can be set to a DATE-TIME value type, in which case the value MUST specify an UTC timezone DATE-TIME value.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::TRIGGER
- Kigkonsult\Icalcreator\Vcalendar::VALUE
- Kigkonsult\Icalcreator\Vcalendar::DURATION
- Kigkonsult\Icalcreator\Vcalendar::DATE_TIME
- Kigkonsult\Icalcreator\Vcalendar::RELATED
- Kigkonsult\Icalcreator\Vcalendar::START
- Kigkonsult\Icalcreator\Vcalendar::END
are available.

Create TRIGGER

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

valarm::createTrigger()

Example

$str = $component->createTrigger();

Delete TRIGGER

Remove TRIGGER from component.

Format

valarm::deleteTrigger()

Example

$valarm->deleteTrigger();

Get TRIGGER

If set, returns property value, otherwise bool false.

Format 1

valarm::getTrigger()

output = duration1/date3

Format 2

Note details about property value/params.

valarm::getTrigger( true )

output = [ "value" => duration1/date3 ), "params" => params4 ]

Example

$trigger = $valarm->getTrigger();

is TRIGGER set

Return bool true if TRIGGER is set (i.e. non-empty).

Format

calendarComponent::isTriggerSet()

Example

$isPropSet = $valarm->isTriggerSet();

Set TRIGGER

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) and on DateTime/DateInterval error.

Format 1

valarm::setTrigger( duration1 [, params4 ] )

Format 2

valarm::setTrigger( duration2 [, params4 ] )

Format 3

valarm::setTrigger( date3 [, params4 ] )

duration1 = (object) DateInterval class instance duration1 = (string) dur-value = (["+"]/"-")"P"(dur-date/dur-time/dur-week) like "P1DT2H3M4S" dur-date = dur-day [dur-time] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-week = 1*DIGIT "W" dur-day = 1*DIGIT "D" dur-hour = 1*DIGIT "H" [dur-minute] dur-minute = 1*DIGIT "M" [dur-second] dur-second = 1*DIGIT "S" date3 = (object) DateTimeInterface instance, will be set to UTC if not UTC timezone date3 = (string) datetime string* params4 = (array) ( [[ reltype [, trigRelparam ]] / datetimeparam ] *[, xparams ] ) reltyp = Vcalendar::RELATED => Vcalendar::START / Vcalendar::END // default Vcalendar::START trigRelparam = Vcalendar::VALUE => Vcalendar::DURATION // default Vcalendar::DURATION datetimeparam = Vcalendar::VALUE => Vcalendar::DATE_TIME // mandatory if DATE-TIME xparams = (string) key => (string) value // key prefix "X-"
* please notice date restraints.

Example 1

A fix date duration

try { $valarm->setTrigger( new DateTime( '2007-06-05 02:02:03 UTC' )); } catch( Exception $e ) { die( $e->getMessage()); }

Example 2

A duration, 1 hour 2 min 3 sec, before start (before default)

try { $dateInterval = new DateInterval( "PT1H2M3S" ); $dateInterval->invert = 1; $valarm->setTrigger( $dateInterval ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 3

A duration, 1 week after end.

try { $valarm->setTrigger( "P1W", [ Vcalendar::RELATED => Vcalendar::END ] ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 4

A duration, 1 hour 2 min 3 sec, before start (before default)

try { $valarm->setTrigger( "-PT1H2M3S" ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 5

A duration, 1 hour 2 min 3 sec, before start (before default).
Subject for removal in future versions.

try { $valarm->setTrigger( null, null, null, null, 1, 2, 3 ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 6

A duration, 1 hour 2 min 3 sec, before start (before default).
Subject for removal in future versions.

try { $valarm->setTrigger( [ "hour"=> 1, "min"=> 2, "sec"=> 3 ] ); } catch( Exception $e ) { die( $e->getMessage()); }

Example 7

A duration, 1 week before start (before default).
Subject for removal in future versions.

try { $valarm->setTrigger( null, null, null, 1 ); } catch( Exception $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.55 TZID

This property specifies the text value that uniquely identifies the VTIMEZONE calendar component and is REQUIRED, but MUST NOT occur more than once.

The value type for TZID is TEXT.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::TZID is available.

Create TZID

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

vtimezone::createTzid()

Example

$str = $component->createTzid();

Delete TZID

Remove TZID from component.

Format

vtimezone::deleteTzid()

Example

$vtimezone->deleteTzid();

Get TZID

If set, returns property value, otherwise bool false.

Format 1

vtimezone::getTzid()

output = tzid1

Format 2

Note details about property value/params.

vtimezone::getTzid( true )

output = [ "value" => tzid1, "params" => xparams2 ]

Example

$tzid = $vtimezone->getTzid();

is TZID set

Return bool true if TZID is set (i.e. non-empty).

Format

calendarComponent::isTzidSet()

Example

$isPropSet = $vtimezone->isTzidSet();

Set TZID

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

vtimezone::setTzid( tzid [, xparams ] )

tzid1 = (string) Value type TEXT xparams2 = (array)( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtimezone() ->setTzid( "US-Eastern" );


[index] [top] [up]

3.2.56 TZID-ALIAS-OF

This property specifies a time zone identifier for which the main time zone identifier is an alias.

Note, as described in

rfc7808 "Time Zone Data Distribution Service"
TZID-ALIAS-OF may occur zero or more times in VTIMEZONE and may NOT be supported by all calendaring software.

The value type for TZID-ALIAS-OF is TEXT.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::TZID-ALIAS-OF is available.

For methods and formatting, explore the TZID property.


[index] [top] [up]

3.2.57 TZNAME

This property specifies the customary designation for a STANDARD or DAYLIGHT description and is OPTIONAL and MAY occur more than once.

The value type for TZNAME is TEXT.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::TZNAME
- Kigkonsult\Icalcreator\Vcalendar::LANGUAGE
are available.

Create TZNAME

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

vtimezone::createTzname()

Example

$str = $component->createTzname();

Delete TZNAME

Remove TZNAME from component.

Format

vtimezone::deleteTzname()

Example 1

Delete (single/first) TZNAME property.

$vtimezonestd->deleteTzname();

Example 2

Delete TZNAME property no 2.

$vtimezonestd->deleteTzname( 2 );

Example 3

Deleting all TZNAME properties.

while( $vtimezonestd->deleteTzname()) { continue; }

Get TZNAME

If set, returns property value, otherwise bool false.

Format 1

vtimezone::getTzname()

output = tzname1

Format 2

Note details about property value/params.

vtimezone::getTzname( propOrderNo/null, true )

propOrderNo = (int) specific property value

output = [ "value" => tzname1, "params" => params2 ]

Format 3

vtimezone::getTzname( propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo TZNAME

Example

$tzname = $timezonestandard->getTzname();

is TZNAME set

Return bool true if TZNAME is set (i.e. non-empty).

Format

calendarComponent::isTznameSet()

Example

$isPropSet = $daylight->isTznameSet();

Set TZNAME

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) or invalid offset value;.

Format

vtimezone::setTzname( tzname [, params [, propOrderNo ]] )

tzname1 = (string) Value type TEXT params2 = (array) ( Vcalendar::LANGUAGE => (string) "lang*", *xparams ) xparams = (string) key => (string) value // key prefix "X-" propOrderNo = (int) order number // 1=1st, 2=2nd etc lang* = as defined in [RFC5546]

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtimezone() ->setTzid( "AKST" ); $standard = $vtimezone->newStandard() ->setTzname( "AKST" ); $daylight = $vtimezone->newDaylight() ->setTzname( "AKDT" );


[index] [top] [up]

3.2.58 TZOFFSETFROM

This property specifies the offset which is in use prior to this TIMEZONE observance. The property is REQUIRED, but MUST NOT occur more than once in STANDARD and DAYLIGHT components.

The value type is UTC-OFFSET, "+" / "-" time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::TZOFFSETFROM is available.

Create TZOFFSETFROM

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

vtimezone::createTzoffsetfrom()

Example

$str = $component->createTzoffsetfrom();

Delete TZOFFSETFROM

Remove TZOFFSETFROM from component.

Format

vtimezone::deleteTzoffsetfrom()

Example

$vtimezonestd->deleteTzoffsetfrom();

Get TZOFFSETFROM

If set, returns property value, otherwise bool false.

Format 1

vtimezone::getTzoffsetfrom()

output = tzoffsetfrom1

Format 2

Note details about property value/params.

vtimezone::getTzoffsetfrom( true )

output = [ "value" => tzoffsetfrom1, "params" => xparams2 ]

Example

$tzoffsetfrom = $tzstandard->getTzoffsetfrom();

is TZOFFSETFROM set

Return bool true if TZOFFSETFROM is set (i.e. non-empty).

Format

calendarComponent::isTzoffsetfromSet()

Example

$isPropSet = $daylight->isTzoffsetfromSet();

Set TZOFFSETFROM

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) and on invalid offset value.

Format

vtimezone::setTzoffsetfrom( tzoffsetfrom [, xparams ] )

tzoffsetfrom1 = (int) (+/-)HHmm[ss] // UTC offset xparams2 = (array) ( *[ /string) key => (string) value ] ) // key prefix "X-"

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtinezone() ->setTzid( "US-Eastern" ) ->setLastmodified( "19870101" ); $standard = $vtimezone->newStandard() ->setTzname( "EST" ) ->setTzoffsetfrom( "-0500" );


[index] [top] [up]

3.2.59 TZOFFSETTO

This property specifies the offset which is in use in this TIMEZONE observance. The property is REQUIRED, but MUST NOT occur more than once in STANDARD and DAYLIGHT components.

The value type is UTC-OFFSET, "+" / "-" time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::TZOFFSETTO is available.

Create TZOFFSETTO

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

vtimezone::createTzoffsetto()

Example

$str = $component->createTzoffsetto();

Delete TZOFFSETTO

Remove TZOFFSETTO from component.

Format

vtimezone::deleteTzoffsetto()

Example

$daylight->deleteTzoffsetto();

Get TZOFFSETTO

If set, returns property value, otherwise bool false.

Format 1

vtimezone::getTzoffsetto()

output = tzoffsetto1

Format 2

Note details about property value/params.

vtimezone::getTzoffsetto( true )

output = [ "value" => tzoffsetto1, "params" => xparams2 ]

Example

$tzoffsetto = $tztandard->getTzoffsetto();

is TZOFFSETTO set

Return bool true if TZOFFSETTO is set (i.e. non-empty).

Format

calendarComponent::isTzoffsettoSet()

Example

$isPropSet = $daylight->isTzoffsettoSet();

Set TZOFFSETTO

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true) and on invalid offset value.

Format

vtimezone::setTzoffsetto(tzoffsetto [, xparams ] )

tzoffsetto1 = (int) (+/-)HHmm[ss] // UTC offset xparams2 = array( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtimezone() ->setTzid( "US-Eastern" ) ->setLastmodified( "19870101" ); $standard = $vtimezone->newStandard(); .. . $daylight = $vtimezone->newDaylight() ->setTzoffsetto( "1345" );


[index] [top] [up]

3.2.60 TZUNTIL

This property specifies an upper bound for the validity period of data within a VTIMEZONE component.

Note, as described in

rfc7808 "Time Zone Data Distribution Service"
TZUNTIL may occur once in VTIMEZONE and may NOT be supported by all calendaring software.

The value type for TZUNTIL is UTC timezone DATE-TIME.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::TZUNTIL is available.

For methods and formatting, explore the CREATED property.


[index] [top] [up]

3.2.61 TZURL

The TZURL provides a means for a VTIMEZONE component to point to a network location that can be used to retrieve an up-to-date version of itself. The property is OPTIONAL and MUST NOT occur more than once.

The value type is URI.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::TZURL is available.

Create TZURL

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

vtimezone::createTzurl()

Example

$str = $component->createTzurl();

Delete TZURL

Remove TZURL from component.

Format

vtimezone::deleteTzurl()

Example

$vtimezone->deleteTzurl();

Get TZURL

If set, returns property value, otherwise bool false.

.

Format 1

vtimezone::getTzurl()

output = tzurl1

Format 2

Note details about property value/params.

vtimezone::getTzurl( true )

output = [ "value" => tzurl1, "params" => xparams2 ]

Example

$tzurl = $timezonestandard->getTzurl();

is TZURL set

Return bool true if TZURL is set (i.e. non-empty).

Format

calendarComponent::isTzurlSet()

Example

$isPropSet = $vtimezone->isTzurlSet();

Set TZURL

Set property value.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

The method throws InvalidArgumentException on url error.

Format

vtimezone::setTzurl(tzurl [, xparams ] )

tzurl1 = (string) Value type URI xparams2 = array( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $vtimezone = $vcalendar->newVtimezone() ->setTzid( "US-Eastern" ); try { $vtimezone->setTzuntil( "19870101T000000" ) } catch( Exception $e ) { die( $e->getMessage(); }


[index] [top] [up]

3.2.62 UID

The persistent, globally Unique IDentifier for the calendar / component. The property (is OPTIONAL and) MUST NOT occur more than once in VEVENT, VTODO and VJOURNAL, VFREEBUSY components.
However, UID is automatically generated in iCalcreator when creating component.

Note, as described in

rfc7953 "New Properties for iCalendar"
UID MUST occur once in VAVAILABILITY and AVAILABLE, may NOT be supported by all calendaring software.
rfc7986 "iCalendar Property Extensions"
UID (may) occur once in VCALENDAR and may NOT be supported by all calendaring software. Calendar UID is automatically generated at instance creation.
rfc9073 "Event Publishing Extensions to iCalendar"
UID may occur once in PARTICIPANT, VLOCATION and VRESOURCE and may NOT be supported by all calendaring software.

UID is (auto set to) a hex-encoded random Universally Unique Identifier (UUID) value as defined in Sections 4.4 and 4.5 of rfc4122. Note, NO deleteUid() method, use setUid() to recreate.

Example

UID:5FC53010-1267-4F8E-BC28-1D7AE55A7C99

UID may be required when importing iCal formatted information into some calendar software (MS etc.), as well as (calendar) properties x-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE", METHOD (value PUBLISH etc.) and the (also automatically created) DTSTAMP property.

The value type for UID is TEXT.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::UID is available.

Create UID

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createUid()

Example

$str = $component->createUid();

Delete UID

Use component::setUid() to recreate.

Get UID

If set, returns property, otherwise bool false.

Format 1

calendarComponent::getUid()

output = uid1

Format 2

Note details about property value/params.

calendarComponent::getUid( true )

output = [ "value" => uid1, "params" => xparams2 ]

Example

$uid = $vevent->getUid();

is UID set

Return bool true.

Format

calendarComponent::isUidSet()

Example

$isPropSet = $vevent->isUidSet();

Set UID

Insert property value, overrides any previously set or auto-created UID.

Do NOT use an integer UID or only a component name as UID (ex. "vevent"), this may cause malfunction in ex. Vcalendar method setComponent with index or UID argument.

The method throws InvalidArgumentException on empty (non-zero) value.

Format

calendarComponent::setUid( uid [, xparams ] )

uid1 = (string) Value type TEXT xparams2 = array( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

$vevent->setUid( "20070803T194810CEST-0123U3PXiX@kigkonsult.se" );

BUT, due to poorly created iCal formatted information, a numeric UID is accepted in the setUid() and parse() methods. Do check for component digit UIDs and remove it (will force a (auto) UID recreation) or (re-)set it manually.

if( ctype_digit( $vevent->getUid())) { $vevent->deleteUid(); }


[index] [top] [up]

3.2.63 URL

This property defines a Uniform Resource Locator (URL) associated with the iCalendar object. The property is OPTIONAL and MUST NOT occur more than once in VEVENT, VTODO, VJOURNAL and VFREEBUSY components.

As described in

rfc5870 "A Uniform Resource Identifier for Geographic Locations (geo URI)",
URL now accepts a "geo" URI value (ex. "geo:40.443,-79.945;u=10") but with no validation
rfc7953 "New Properties for iCalendar"
URL may occur once in VAVAILABILITY, may NOT be supported by all calendaring software.
rfc7986 "iCalendar Property Extensions"
URL may occur once in VCALENDAR and may NOT be supported by all calendaring software.
rfc9073 "Event Publishing Extensions to iCalendar"
URL may occur once in PARTICIPANT and may NOT be supported by all calendaring software.

The value type is URI.

You can SORT calendar (components) on (asc) URL values.

To ease up usage, constant Kigkonsult\Icalcreator\Vcalendar::URL is available.

Create URL

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

calendarComponent::createUrl()

Example

$str = $component->createUrl();

Delete URL

Remove URL from component.

Format

calendarComponent::deleteUrl()

Example

$vevent->deleteUrl();

Get URL

If set, returns property value, otherwise bool false.

Format 1

calendarComponent::getUrl()

output = url1

Format 2

Note details about property value/params.

calendarComponent::getUrl( true )

output = [ "value" => url1, "params" => xparams2 ]

Example

$url = $vevent->getUrl();

is URL set

Return bool true if URL is set (i.e. non-empty).

Format

calendarComponent::isUrlSet()

Example

$isPropSet = $vevent->isUrlSet();

Set URL

Set property value.

The non-rfc (opt urlencoded) value prefix/suffix "<>" (and parameter valuetype) is supported.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true), InvalidArgumentException on url error.

Format

calendarComponent::setUrl( url [, xparams ] )

url1 = (string) Value type URI xparams2 = (array) ( *[ (string) key => (string) value ] ) // key prefix "X-"

Example

try { $vtodo->setUrl( "https://www.icaldomain.net" ); } catch( InvalidArgumentException $e ) { die( $e->getMessage()); }


[index] [top] [up]

3.2.64 X-PROPERTY

A VCALENDAR/component, non-standard property with a TEXT value and a name with an "X-" prefix. An x-property, with an unique name, can occur only once but the number of x-properties are unlimited.

In VCALENDAR, the X-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE" may be required when importing iCal formatted information into some calendaring software (MS etc.), as well as METHOD property (value PUBLISH etc.) and the (automatically created) DTSTAMP and UID properties.

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::X_WR_CALNAME
- Kigkonsult\Icalcreator\Vcalendar::X_WR_CALDESC
- Kigkonsult\Icalcreator\Vcalendar::X_WR_RELCALID
- Kigkonsult\Icalcreator\Vcalendar::X_WR_TIMEZONE
- Kigkonsult\Icalcreator\Vcalendar::X_LIC_LOCATION
are available.

The value type is TEXT.

Component, below, stands for VCALENDAR or any calendarComponent.

Note Pc::isXprefixed() / setXPrefix() / unsetXPrefix() (last) key utility (static) methods.

Create X-PROPERTY

If set, returns [RFC5545] formatted string, otherwise empty string.

Format

Component::createXprop()

Example

$str = $component->createxProp();

Delete X-PROPERTY

Remove X-PROPERTY from component.

Format

Component::deleteXprop( "<X-PROPERTY>" )

Example 1

Deleting x-property named "X-PROPERTY".

$vevent->deleteXprop( "X-PROPERTY" );

Example 2

Deleting all x-properties.

while( $vevent->deleteXprop()) { continue; }

Get X-property

If set, returns property value, otherwise bool false.

Format 1

Get specific x-propery value.

Component::getXprop( "<X-PROPERTY-NANE>" )

output = [ propertyName1, value2 )

Format 2

Get (next) x-property value.

Component::getXprop()

output = array( propertyName1 , value2 )

Format 3

Note details about property value/params.

Component::getXprop( null, propOrderNo/null, true )

propOrderNo = (int) specific property value

output = [ propertyName1, [ "value" => value2 ), "params" => params3 ] ]

Format 4

Component::getXprop( null, propOrderNo )

propOrderNo = (int) specific property value

Get propOrderNo X-property

Example 1

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); if( $vcalendar->isXpropSet( Vcalendar::X_WR_TIMEZONE )) { $d = $vcalendar->getXprop( Vcalendar::X_WR_TIMEZONE ); echo $d[1]; // $d = array( "X-WR-TIMEZONE", value2 ) } // end if

Example 2

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); while( $xprop = $vcalendar->getXprop )) { // $xprop = [ propertyName1, value2 ] .. . } // end while

Example 3

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); if( $xprop = $vcalendar->getXprop( "X-ABC-MMSUBJ" )) { // $xprop = [ "X-ABC-MMSUBJ", value2 ] .. . } // end if

Example 4

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); while( $xprop = $vcalendar->getXprop( null, null, true )) { /* $xprop = [ propertyName1, [ "value" => value2, "params" => params3 ] ] */ } // end while

Get all X-properties

Returns array

Format 1

Component::getAllXprop()

output = [ *[ propertyName1, value2 ) ] ]

Format 2

Note details about property value/params.

Component::getAllXprop( true )

output = [ *[ propertyName1, [ "value" => value2, "params" => params3 ] ] ]

is X-property set

Return bool true if X-property (key) is set (i.e. non-empty).

Format

calendarComponent::isXpropSet( [key] )

key = (string) X-property name

Example

$isPropSet = $vevent->isXpropSet();

Set X-property

Insert property name and value. If an x-prop with the same name already exists, it will be replaced.

The method throws InvalidArgumentException on empty value and config ALLOWEMPTY is set to false (default true).

Format

Component::setXprop( propertyName, propertyData [, params ] )

propertyName1 = (string) Any property name with a "X-" prefix value2 = (string) Value type TEXT params3 = (array) ( [Vcalendar::LANGUAGE => (string) "lang*"] *[, xparams] ) xparam = (string) key => (string) value // key prefix "X-" lang* = as defined in [RFC5546]

Example

$component->setXprop( "X-ABC-MMSUBJ", "https://load.noise.org/mysubj.wav" );


[index] [top] [up]

3.3 iCalcreator Component configuration methods

3.3.1 Language

Language for specific calendar component.

Language set at component level can be overridden by specific component property parameter.
A successful "setConfig" returns bool true.

There is a convenient config key constant available: Vcalendar::LANGUAGE.

Get language
Language for calendar (only if language is set at component level).

Format

calendarComponent::getConfig( "language" )

Example

$lang = $vevent->getConfig( Vcalendar::LANGUAGE );

Set LANGUAGE

Format

calendarComponent::setConfig( "language", lang )

lang = (string) language

Example

$vevent->setConfig( Vcalendar::LANGUAGE, "en" );


[index] [top] [up]

3.4 iCalcreator misc. methods

Calendar component subcomponent functions.

3.4.1 deleteComponent

Remove subcomponent from component.

Format

calendarComponent::deleteComponent( orderNumber )

orderNumber = (int) component order Number

Remove component with order number (1st=1, 2nd=2).

calendarComponent::deleteComponent( componentType [, componentSuborderNumber])

componentType = (string) component type componentSuborderNumber = (int) component suborder number

Remove component with component type (ex. "vevent") and order 1 alt. suborder number.

calendarComponent::deleteComponent( UID )

Remove component with UID. N.B UID is NOT set for ALARM / timezone components.

Example 1

Delete first subcomponent.

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $comp1 = $vcalendar->getComponent(); $comp1->deleteComponent( 1 );

Example 2

Delete all subcomponents.

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $comp1 = $vcalendar->getComponent(); while( $comp1->deleteComponent( Vcalendar::VALARM ) { continue; }


[index] [top] [up]

3.4.2 getComponent

Get subComponent from component.

Format 1

calendarComponent::getComponent()

Get next component until end-of-components.

Format 2

calendarComponent::getComponent( int orderNumber )

orderNumber = (int) component order number

Get component with order number (1st=1, 2nd=2).

Format 3

calendarComponent::getComponent( string componentType [, int componentSuborderNumber])

componentType = (string) component type componentSuborderNumber = (int) component suborder number

Get (next) component with component type (until end-of-components) alt. component with component type and suborder number (1st=1, 2nd=2..).

Format 4

calendarComponent::getComponent( UID )

Get component with UID. N.B UID is NOT set for ALARM / timezone components.

Example

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); $comp1 = $vcalendar->getComponent()); while( $subComp = $comp1->getComponent()) { .. .


[index] [top] [up]

3.4.3 getComponents

Return (array) subComponents from component.

format

calendarComponent::getComponents( [ compType ] )

compType : (string) component type

Example

Return all Valarms

use Kigkonsult\Icalcreator\Vcalendar; $vcalendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $iCalContent = file_get_contents( "calendar.ics" ); $vcalendar->parse( $iCalContent ); foreach( $vcalendar->getComponents( Vcalendar::VEVENT ) as $component ) { foreach( $component->getComponents( Vcalendar::VALARM ) as $subComponent ) { .. . } .. . }


[index] [top] [up]

3.4.4 setComponent

Add calendar component to the Vcalendar instance or replace/update component in the Vcalendar instance.

Format 1

calendarComponent::setComponent( component ) addSubComponent( component ) // alias

Insert last in component chain.

Format 2

calendarComponent::setComponent( component, int orderNumber )

orderNumber = (int) component order number

Replace component with order number(1st=1, 2nd=2). If orderNumber is not found, component is inserted last in chain.

Format 3

calendarComponent::setComponent( component, componentType [,componentSuborderNumber])

componentType = (string) component type componentSuborderNumber = (int) component suborder number

Replace component with component type and component order number. if orderNumber is not found, component is inserted last in chain.

Example

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Vevent; use Kigkonsult\Icalcreator\Valarm; $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se", ]; $vcalendar = new Vcalendar( $config ); // initiate new CALENDAR $vevent = new Vevent( $config ); // add some EVENT properties $vevent->setDtstart( new DateTime( "2006-12-24 19:30:00" ); $vevent->set...( ... ... $valarm = new Valarm( $config ); $valarm->setTrigger( ... $vevent->setComponent( $valarm ); $vcalendar->setComponent( $vevent );


[index] [top] [up]

3.4.5 Vtimezone populate

The Util/VtimezonePopulateFactory::process (static) method, applied on a Vcalendar instance, return the Vcalendar instance with Vtimezone(s), Standard and Daylight components, using PHP DateTimeZone class and time zone transition (UTC) timestamps. If Vtimezone(s) exists in calendar, it is replaced.

Recommendation is to call the method after editing components using arg timezone(s) (and without (period) from/to arguments).

To ease up usage, constants
- Kigkonsult\Icalcreator\Vcalendar::X_WR_TIMEZONE
- Kigkonsult\Icalcreator\Vcalendar::X_LIC_LOCATION
are available.

Throws Exception on invalid (PHP) timezone.

Format

Util/VtimezonePopulateFactory::process::populate( calendar, [ timezone [, xprops, [, from [, to ]]]] )

calendar = (object) Vcalendar instance timezone = (string|array) valid timezone(s), acceptable by PHP DateTimeZone* xprops = (array) ( *[ x-propName => value ] ), timezone non-standard properties from = DateTimeInterface | (int) timestamp, period start date** to = DateTimeInterface | (int) timestamp, period end date** * If no argument timezone, the argument xProps is searched for "X-WR-TIMEZONE" and "X-LIC-LOCATION" keys. If not found then calendar are searched for the X-properties. If still none found, "UTC" is used. ** If empty "from" and "to" arguments, the calendar components "DTSTART" values are used to get the lowest (modified, minus 12 month) and highest (modified, plus 18 month) dates.

Example

Using the Util/VtimezonePopulateFactory::process (static) method.

use Kigkonsult\Icalcreator\Vcalendar; use Kigkonsult\Icalcreator\Util\VtimezonePopulateFactory; $calendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $timezone = 'Europe/Stockholm'; .. . // insert components or parse an iCal string .. . $calendar = VtimezonePopulateFactory::process( $calendar, $timezone );

Example 2

Using the shortcut The Vcalendar::vtimezonePopulate() method.

use Kigkonsult\Icalcreator\Vcalendar; $calendar = new Vcalendar( [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ] ); $timezone = 'Europe/Stockholm'; .. . // insert components or parse an iCal string .. . $calendar->VtimezonePopulate( $timezone );

Output example (when using Vcalendar createCalendar or returnCalendar methods):

BEGIN:VTIMEZONE TZID:Europe/Stockholm X-LIC-LOCATION:Europe/Stockholm BEGIN:STANDARD DTSTART:20111030T003000 TZOFFSETFROM:+0200 TZOFFSETTO:+0100 TZNAME:CET END:STANDARD BEGIN:DAYLIGHT DTSTART:20110327T002000 TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST END:DAYLIGHT END:VTIMEZONE


[index] [top] [up]

3.4.6 Review timezones, opt alter to PHP timezone

RegulateTimezoneFactory (+RegulateTimezoneFactoryTest) is deprecated due to 2.41.60, GitHub#103 (non-PHP timezones).

The Vcalendar::parse or component::parse will throw exception when the input data contains PHP unknown timezones, ex MS listed at https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones.

To support other (MS) timezones mapping to PHP timezones (ie timezones with the same or nearby UTC offset), the RegulateTimezoneFactory::process method can be used before parse. The factory review the Vtimezone property TZID and component date properties DTSTART, DTEND, DUE, RECURRENCE-ID, EXDATE and RDATE and parameter "TZID".

The method throws Exception when unknown timezone not can be mapped.

Return rfc5545 formatted calendar string.

Format

RegulateTimezoneFactory::process( iCalData )

iCalData = string|array $iCal strict rfc5545 formatted calendar

use Kigkonsult\Icalcreator\Util\RegulateTimezoneFactory; $iCalStringToParse = RegulateTimezoneFactory::process( $iCalInput );

Any unknown timezone (ex MS "Customized Time Zone"), if used in VTIMEZONE, will map to a PHP timezone (using TZOFFZETTO values) with nearby offsets.

To specify a "direct" map for a PHP unknown timezone, use (in static style format)

RegulateTimezoneFactory::process( icalInput, [ *( <otherTimezone> => <phpTimezone> ) ] )

or (as object oriented style example)

use Kigkonsult\Icalcreator\Util\RegulateTimezoneFactory; $iCalStringToParse = RegulateTimezoneFactory::factory( $iCalInput ) ->addOtherTzPhpRelation( $otherTimezone, $phpTimezone ) ->processCalendar() ->getOutputiCal();


[index] [top] [up]

4 XML, json and vCard support

4.3 iCalcreator and (rfc6321) XML

Ical XML is defined by rfc6321, "xCal: The XML Format for iCalendar".

4.3.1 iCal2XML

The (static) XML\Formatter::iCal2XML method converts an Vcalendar instance to XML.

The iCal2XML method uses the SimpleXML extension (and "libxml" PHP extension).

An rfc6321 XML string is returned.

Format

XML\Formatter::iCal2XML( iCalobj )

iCalobj = (object) Vcalendar instance

use Kigkonsult\Icalcreator\Xml\Formatter as XmlFormatter; $xmlString = XmlFormatter::iCal2XML( $vcalendar );


4.3.2 XML2iCal

The (static) Xml\Parser::XML2iCal method accepts a well-formed (rfc6321) XML string as argument.

On success, an Vcalendar instance is returned, on error false.

Format

Xml\Parser::XML2iCal( xmlstr [, config] )

xmlstr = (string) rfc6321 XML config = (array) iCalcreator config array (opt)

use Kigkonsult\Icalcreator\Xml\Parser as XmlParser; $config = [ Vcalendar::UNIQUE_ID => "kigkonsult.se" ]; $vcalendar = XmlParser::XML2iCal( $xlmString, $config );


[index] [top] [up]

4.4 iCalcreator and json export

You can export and import (rfc8984) iCal json using PhpJsCalendar.

You can also export iCal (XML) as json using a Vcalendar instance, Xml\Formatter::iCal2XML() (above), simplexml_load_string and json_encode as follows:

use Kigkonsult\Icalcreator\Xml\Formatter as XmlFormatter; $xml = XmlFormatter::iCal2XML( $vcalendar ); $json = json_encode( simplexml_load_string( $xml ));


[index] [top] [up]

4.5 iCalcreator and iCalvCardFactory class

The Kigkonsult\Icalcreator\Util\IcalvCardFactory class has two methods to produce vCard string output.

4.5.1 iCal2vCard

The (static) method converts a single email (iCal "cal-address") into (string) vCard.

Returns vCard string.

Format

IcalvCard::iCal2vCard( email [, version ] )

email = (string) email, ATTENDEE, ORGANIZER and opt CONTACT "cal-address" version = (string) vCard version, "2.1" (default), "3.0", "4.0"


[index] [top] [up]

4.5.2 iCal2vCards

The (static) method collects and converts all ATTENDEEs and ORGANIZERs values (iCal "cal-address") and CONTACTs into simplified vCard (string) output using

Format

IcalvCard::iCal2vCards( vcalendar [, version [, inclParams [, count ]]] )

vcalendar = (object) Vcalendar instance version = (string) vCard version, "2.1" (default), "3.0", "4.0" inclParams = (bool) default true: search property values and parameters, false: values only count = (int) number of vCards in output

Return vCard(s) string.


[index] [top] [up]

5 COPYRIGHT AND LICENSE

In this document may exist quotes and/or extracts from IETF rfc documents, for copyright and licence, see the "Copyright Notice" content part in top of each IETF rfc document.

Copyright(c) 2007-2022 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
Link https://kigkonsult.se
Package iCalcreator
Version 2.41.70
License Subject matter of licence is the software iCalcreator.
The above copyright, link, package and version notices,
this licence notice and the invariant [rfc5545] PRODID result use
as implemented and invoked in iCalcreator shall be included in
all copies or substantial portions of the iCalcreator.

iCalcreator is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.

iCalcreator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with iCalcreator. If not, see <https://www.gnu.org/licenses/>.

[index] [top] [up]