Ics
in package
ICS class helper.
Table of Contents
Constants
- DATE_FORMAT = 'Ymd\\THis\\Z'
- Define date format.
Properties
- $availableProperties : array<string|int, mixed>
- Predefined object keys.
- $properties : array<string|int, mixed>
- Contains added properties.
Methods
- __construct() : mixed
- Ics constructor.
- toString() : mixed
- Convert array to string.
- buildProps() : mixed
- Build ICS properties.
- escapeString() : mixed
- Remove undesired characters.
- formatTimestamp() : mixed
- Convert timestamp to Datetime.
- sanitizeVal() : mixed
- Sanitize value.
- set() : mixed
- Helper function setting value to correspondent key.
Constants
DATE_FORMAT
Define date format.
public
mixed
DATE_FORMAT
= 'Ymd\\THis\\Z'
Properties
$availableProperties
Predefined object keys.
private
array<string|int, mixed>
$availableProperties
= ['description', 'dtend', 'dtstart', 'location', 'summary', 'url']
$properties
Contains added properties.
private
array<string|int, mixed>
$properties
= []
Methods
__construct()
Ics constructor.
public
__construct(mixed $props) : mixed
Parameters
- $props : mixed
toString()
Convert array to string.
public
toString() : mixed
buildProps()
Build ICS properties.
private
buildProps() : mixed
escapeString()
Remove undesired characters.
private
escapeString(mixed $str) : mixed
Parameters
- $str : mixed
formatTimestamp()
Convert timestamp to Datetime.
private
formatTimestamp(mixed $timestamp) : mixed
Parameters
- $timestamp : mixed
sanitizeVal()
Sanitize value.
private
sanitizeVal(mixed $val[, mixed $key = FALSE ]) : mixed
Parameters
- $val : mixed
- $key : mixed = FALSE
set()
Helper function setting value to correspondent key.
private
set(mixed $key[, mixed $val = FALSE ]) : mixed
Parameters
- $key : mixed
- $val : mixed = FALSE