示例#1
0
文件: ICS.php 项目: Kervinou/OBM
 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;
 }
示例#2
0
文件: VCS.php 项目: Kervinou/OBM
  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;
  }