23 $attendeesCollection = AttendeesCollection::createInstance();
25 if (!is_null($parsedAttendees))
27 foreach($parsedAttendees as $attendee)
30 $participant->setMailto(explode(
':', $attendee[
'value']))[1];
31 $participant->setEmail($attendee[
'parameter'][
'email'] ?? $attendee->getMailTo());
32 $name = explode(
" ", trim($attendee[
'parameter'][
'cn'],
'"'), 2);
35 $participant->setName($participant->getEmail());
39 $participant->setName($name[0]);
40 $participant->setLastName($name[1] ??
'');
42 $participant->setStatus($attendee[
'parameter'][
'partstat']);
43 $participant->setRole($attendee[
'parameter'][
'role']);
44 $participant->setCutype($attendee[
'parameter'][
'cutype']);
46 $attendeesCollection->add($participant);
50 return $attendeesCollection;