We can see that there is no more CUTYPE , ROLE, PARTSTAT and RSVP parameters.
I found out that this function doesn't parse ics line as recommended in RFC5545 especially when using str_getcsv($text, ':') which explodes strings on colon even inside double quote.
I finally decides to re code this function entirely in order respect the RFC5545.
The parseLine() function analyses the line characters by characters and return a array of strings and separators.
Then the keyValueFromString() create the object corresponding to what is expected in RFC5545 and matching with old function template.
I change this function because of a unexpected behaviour.
Indeed, I have this line in my ics file :
ATTENDEE;CN="Lieu : Laboratoire Dép. d'Analyse, Bâtiment : Laboratoire Dép. d'Analyse, Étage : 0, Salle : Grande salle";CUTYPE=RESOURCE;ROLE=NON-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=TRUE:mailto:xxx@xxx.fr
but when it was parsed by keyValueFromString function I get this result:
Array (size=2)
0 => string 'ATTENDEE' (length=8)
1 =>
array (size=2)
0 => string 'mailto:xxx@xxx.fr (length=40)
1 =>
array (size=1)
'CN' => string 'Lieu: Laboratoire Dép. d'Analyse, Bâtiment: Laboratoire Dép. d'Analyse, Étage: 0, Salle: Grande salle;CUTYPE' (length=112)
We can see that there is no more CUTYPE , ROLE, PARTSTAT and RSVP parameters.
I found out that this function doesn't parse ics line as recommended in RFC5545 especially when using
str_getcsv($text, ':')
which explodes strings on colon even inside double quote.I finally decides to re code this function entirely in order respect the RFC5545.
The parseLine() function analyses the line characters by characters and return a array of strings and separators.
Then the keyValueFromString() create the object corresponding to what is expected in RFC5545 and matching with old function template.