54 foreach (
$data->children() as $component) {
55 if (!$component instanceof VObject\
Component) {
60 if ($component->name ===
'VTIMEZONE') {
61 $this->vtimezones[(string)$component->TZID] = $component;
66 if (!$component->UID) {
67 $component->UID = sha1(microtime()) .
'-vobjectimport';
69 $uid = (string)$component->UID;
72 if (!array_key_exists($uid, $this->objects)) {
73 $this->objects[$uid] =
new VCalendar();
76 $this->objects[$uid]->add(clone $component);
91 if ($object = array_shift($this->objects)) {
94 $object->version =
'2.0';
96 $object->calscale =
'GREGORIAN';
99 foreach ($this->vtimezones as $vtimezone) {
100 $object->add($vtimezone);
foreach($paths as $path) if(!class_exists( 'Sabre\\VObject\\Version'))
__construct($input, $options=0)
Constructor.
const VERSION
Full version number.
getNext()
Every time getNext() is called, a new object will be parsed, until we hit the end of the stream...
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
Exception thrown by Reader if an invalid object was attempted to be parsed.