vcard
vcard copied to clipboard
Support parsing additional elements
In https://github.com/andig/carddav2fb/blob/master/src/Vcard/Parser.php#L259 we need to parse additional elements generated by AVM Fritz!Boxes. Currently, since parse()
is such a monster function it is not extensible without basically duplicating the entire code.
Would you be open for a PR to a) either support a simple callback function or something like parseRemainingElements()
or b) move the entire parse()
function into its own LineParser
class?
Asking upfront as I can see there's a number of unanswered PRs.
There is a new version of the code being made on the 2.0.0-dev branch, would this fit your needs?
Not really sure where to look for extensibility. Could you point to a specific file in 2.0?
Which kind of 'additional' elements are you looking for of vcard?
The use case is having carddav server store custom, non-standard attributes, e.g. for vanity and quick-dial phone numbers. Those are converted and transferred to Fritzbox/FritzFron devices. We're using X-QUICKDIAL
and X-VANITY
. The parser could allow to call a custom parser extension for unknown attributes (using a proper interface or be restructured to allow easier subclassing).