Properties

$components

$components : array

Type

array — container for sub-components

$unparsed

$unparsed : array

Type

array — calendar/components in 'raw' text...

$xprop

$xprop : array

Type

array — component property X-property value @access protected

$allowEmpty

$allowEmpty : boolean

Type

boolean — config variable @var string $language config variable @var string $nl config variable @var string $unique_id config variable @var string $format config variable @var string $dtzid config variable @access protected

$language

$language : 

Type

$nl

$nl : 

Type

$unique_id

$unique_id : 

Type

$format

$format : 

Type

$dtzid

$dtzid : 

Type

$componentStart1

$componentStart1 : string

Type

string — valendar/component internal variable @var string $componentStart2 valendar/component internal variable @var string $componentEnd1 valendar/component internal variable @var string $componentEnd2 valendar/component internal variable @var string $elementStart1 valendar/component internal variable @var string $elementStart2 valendar/component internal variable @var string $elementEnd1 valendar/component internal variable @var string $elementEnd2 valendar/component internal variable @var string $intAttrDelimiter valendar/component internal variable @var string $attributeDelimiter valendar/component internal variable @var string $valueInit valendar/component internal variable @access protected

$componentStart2

$componentStart2 : 

Type

$componentEnd1

$componentEnd1 : 

Type

$componentEnd2

$componentEnd2 : 

Type

$elementStart1

$elementStart1 : 

Type

$elementStart2

$elementStart2 : 

Type

$elementEnd1

$elementEnd1 : 

Type

$elementEnd2

$elementEnd2 : 

Type

$intAttrDelimiter

$intAttrDelimiter : 

Type

$attributeDelimiter

$attributeDelimiter : 

Type

$valueInit

$valueInit : 

Type

$xcaldecl

$xcaldecl : array

Type

array — xCal declaration container @access protected

$calscale

$calscale : array

Type

array — calendar property variable

$method

$method : 

Type

$prodid

$prodid : 

Type

$version

$version : 

Type

$directory

$directory : array

Type

array — calendar config variable

$filename

$filename : 

Type

$url

$url : 

Type

$headers

$headers : array

redirect headers

Type

array

Methods

createXprop()

createXprop() : string

creates formatted output for calendar/component property x-prop

Returns

string

setXprop()

setXprop(string  $label, string  $value, array  $params = FALSE) : boolean

set calendar property x-prop

Parameters

string $label
string $value
array $params

optional

Returns

boolean

_createFormat()

_createFormat() : boolean

create element format parts

Returns

boolean

__construct()

__construct(array  $config = array()) 

constructor for calendar object

Parameters

array $config

iCalcreatorVersion()

iCalcreatorVersion() : string

return iCalcreator version number

Returns

string

createCalscale()

createCalscale() : string

creates formatted output for calendar property calscale

Returns

string

setCalscale()

setCalscale(string  $value) : void

set calendar property calscale

Parameters

string $value

createMethod()

createMethod() : string

creates formatted output for calendar property method

Returns

string

setMethod()

setMethod(string  $value) : boolean

set calendar property method

Parameters

string $value

Returns

boolean

createProdid()

createProdid() : string

creates formatted output for calendar property prodid

Returns

string

_makeProdid()

_makeProdid() : void

make default value for calendar prodid, do NOT alter or remove this method or invoke of this method

_makeUnique_id()

_makeUnique_id() : void

make default unique_id for calendar prodid

createVersion()

createVersion() : string

creates formatted output for calendar property version

Returns

string

_makeVersion()

_makeVersion() : void

set default calendar version

setVersion()

setVersion(string  $value) : void

set calendar version

Parameters

string $value

deleteProperty()

deleteProperty(mixed  $propName = FALSE, integer  $propix = FALSE) : \bool,

delete calendar property value

Parameters

mixed $propName

bool FALSE => X-property

integer $propix

specific property in case of multiply occurences

Returns

\bool, —

if successfull delete

getProperty()

getProperty(string  $propName = FALSE, integer  $propix = FALSE, boolean  $inclParam = FALSE) : mixed

get calendar property value/params

Parameters

string $propName
integer $propix

specific property in case of multiply occurences

boolean $inclParam

Returns

mixed

setProperty()

setProperty() : boolean

general vcalendar property setting

Returns

boolean

getConfig()

getConfig(mixed  $config = FALSE) : \value

get vcalendar config values or * calendar components

Parameters

mixed $config

Returns

\value

setConfig()

setConfig(mixed  $config, string  $value = FALSE) : void

general vcalendar config setting

Parameters

mixed $config
string $value

addComponent()

addComponent(object  $component) : void

add calendar component to container

alias to setComponent

Parameters

object $component

calendar component

deleteComponent()

deleteComponent(mixed  $arg1, mixed  $arg2 = FALSE) : void

delete calendar component from container

Parameters

mixed $arg1

ordno / component type / component uid

mixed $arg2

optional, ordno if arg1 = component type

getComponent()

getComponent(mixed  $arg1 = FALSE, mixed  $arg2 = FALSE) : object

get calendar component from container

Parameters

mixed $arg1

optional, ordno/component type/ component uid

mixed $arg2

optional, ordno if arg1 = component type

Returns

object

newComponent()

newComponent(string  $compType) : object

create new calendar component, already included within calendar

Parameters

string $compType

component type

Returns

object

selectComponents()

selectComponents(mixed  $startY = FALSE, mixed  $startM = FALSE, integer  $startD = FALSE, integer  $endY = FALSE, integer  $endM = FALSE, integer  $endD = FALSE, mixed  $cType = FALSE, boolean  $flat = FALSE, boolean  $any = TRUE, boolean  $split = TRUE) : array

select components from calendar on date or selectOption basis

Ensure DTSTART is set for every component. No date controls occurs.

Parameters

mixed $startY

optional, (int) start Year, default current Year ALT. (obj) start date (datetime) ALT. array selecOptions ( *[ => ] )

mixed $startM

optional, (int) start Month, default current Month ALT. (obj) end date (datetime)

integer $startD

optional, start Day, default current Day

integer $endY

optional, end Year, default $startY

integer $endM

optional, end Month, default $startM

integer $endD

optional, end Day, default $startD

mixed $cType

optional, calendar component type(-s), default FALSE=all else string/array type(-s)

boolean $flat

optional, FALSE (default) => output : array[Year][Month][Day][] TRUE => output : array[] (ignores split)

boolean $any

optional, TRUE (default) - select component(-s) that occurs within period FALSE - only component(-s) that starts within period

boolean $split

optional, TRUE (default) - one component copy every DAY it occurs during the period (implies flat=FALSE) FALSE - one occurance of component only in output array

Returns

array —

or FALSE

selectComponents2()

selectComponents2(array  $selectOptions) : array

select components from calendar on based on specific property value(-s)

Parameters

array $selectOptions

(string) key => (mixed) value, (key=propertyName)

Returns

array

replaceComponent()

replaceComponent(object  $component) : boolean

replace calendar component in vcalendar

Parameters

object $component

calendar component

Returns

boolean

setComponent()

setComponent(object  $component, mixed  $arg1 = FALSE, mixed  $arg2 = FALSE) : boolean

add calendar component to calendar

Parameters

object $component

calendar component

mixed $arg1

optional, ordno/component type/ component uid

mixed $arg2

optional, ordno if arg1 = component type

Returns

boolean

sort()

sort(string  $sortArg = FALSE) : void

sort iCal compoments

ascending sort on properties (if exist) x-current-dtstart, dtstart, x-current-dtend, dtend, x-current-due, due, duration, created, dtstamp, uid if called without arguments, otherwise sorting on specific (argument) property values

Parameters

string $sortArg

parse()

parse(mixed  $unparsedtext = FALSE, resource  $context = null) : boolean

parse iCal text/file into vcalendar, components, properties and parameters

Parameters

mixed $unparsedtext

strict rfc2445 formatted, single property string or array of property strings

resource $context

PHP resource context

Returns

boolean —

FALSE if error occurs during parsing

createCalendar()

createCalendar() : string

creates formatted output for calendar object instance

Returns

string

returnCalendar()

returnCalendar(boolean  $utf8Encode = FALSE, boolean  $gzip = FALSE, boolean  $cdType = TRUE) : boolean

a HTTP redirect header is sent with created, updated and/or parsed calendar

Parameters

boolean $utf8Encode
boolean $gzip
boolean $cdType

TRUE : Content-Disposition: attachment... (default), FALSE : ...inline...

Returns

boolean —

TRUE on success, FALSE on error

saveCalendar()

saveCalendar() : boolean

save content in a file

Returns

boolean —

TRUE on success, FALSE on error

useCachedCalendar()

useCachedCalendar(integer  $timeout = 3600, boolean  $cdType = TRUE) : boolean

if recent version of calendar file exists (default one hour), an HTTP redirect header is sent else FALSE is returned

Parameters

integer $timeout

default 3600 sec

boolean $cdType

TRUE : Content-Disposition: attachment... (default), FALSE : ...inline...

Returns

boolean —

TRUE on success, FALSE on error

_createElement()

_createElement(string  $label, string  $attributes = null, string  $content = FALSE) : string

creates formatted output for calendar component property

Parameters

string $label

property name

string $attributes

property attributes

string $content

property content (optional)

Returns

string

_createParams()

_createParams(array  $params = array(), array  $ctrKeys = array()) : string

creates formatted output for calendar component property parameters

Parameters

array $params

optional

array $ctrKeys

optional

Returns

string