function parseXObmAlert($duration, $options) { $alert = array(); if(!is_null($options['x-obm-id'])) { if(Vcalendar_Utils::entityExist($options['x-obm-id'], 'user')) $alert['user'] = $options['x-obm-id']; } $alert['duration'] = $duration; return $alert; }
function getAttendeeId($attendee, $options, $entity='user') { if(!is_null($options['x-obm-id'])) { if(Vcalendar_Utils::entityExist($options['x-obm-id'], $entity)) return $options['x-obm-id']; } if(preg_match('/^\s*((?U)[^<]*)\s*<?(([^@<]+)@([^\s>]+))>?\s*$/i',$attendee, $match)) { $attendee = $this->getStandardMailto($match); $attendee['cn'] = strtolower($match[1]); } if(is_array($attendee)) { return $this->getOBMId($attendee, $entity); } return NULL; }