-
Notifications
You must be signed in to change notification settings - Fork 125
Sabre VObject VCardConverter
This utility converts vcards from one version to another.
- Class name: VCardConverter
- Namespace: Sabre\VObject
mixed Sabre\VObject\VCardConverter::convert(\Sabre\VObject\Component\VCard $input, integer $targetVersion)
Converts a vCard object to a new version.
targetVersion must be one of: Document::VCARD21 Document::VCARD30 Document::VCARD40
Currently only 3.0 and 4.0 as input and output versions.
2.1 has some minor support for the input version, it's incomplete at the moment though.
If input and output version are identical, a clone is returned.
- Visibility: public
- $input Sabre\VObject\Component\VCard
- $targetVersion integer
void Sabre\VObject\VCardConverter::convertProperty(\Sabre\VObject\Component\VCard $input, \Sabre\VObject\Component\VCard $output, \Sabre\VObject\Property $property, integer $targetVersion)
Handles conversion of a single property.
- Visibility: protected
- $input Sabre\VObject\Component\VCard
- $output Sabre\VObject\Component\VCard
- $property Sabre\VObject\Property
- $targetVersion integer
\Sabre\VObject\Property\Uri Sabre\VObject\VCardConverter::convertBinaryToUri(\Sabre\VObject\Component\VCard $output, \Sabre\VObject\Property\Uri $property, $parameters)
Converts a BINARY property to a URI property.
vCard 4.0 no longer supports BINARY properties.
- Visibility: protected
- $output Sabre\VObject\Component\VCard
- $property Sabre\VObject\Property\Uri - <p>The input property.</p>
- $parameters mixed - <p>List of parameters that will eventually be added to the new property.</p>
\Sabre\VObject\Property\Binary|null Sabre\VObject\VCardConverter::convertUriToBinary(\Sabre\VObject\Component\VCard $output, \Sabre\VObject\Property\Uri $property, $parameters)
Converts a URI property to a BINARY property.
In vCard 4.0 attachments are encoded as data: uri. Even though these may be valid in vCard 3.0 as well, we should convert those to BINARY if possible, to improve compatibility.
- Visibility: protected
- $output Sabre\VObject\Component\VCard
- $property Sabre\VObject\Property\Uri - <p>The input property.</p>
- $parameters mixed - <p>List of parameters that will eventually be added to the new property.</p>
void Sabre\VObject\VCardConverter::convertParameters40(\Sabre\VObject\Property $newProperty, array $parameters)
Adds parameters to a new property for vCard 4.0
- Visibility: protected
- $newProperty Sabre\VObject\Property
- $parameters array
void Sabre\VObject\VCardConverter::convertParameters30(\Sabre\VObject\Property $newProperty, array $parameters)
Adds parameters to a new property for vCard 3.0
- Visibility: protected
- $newProperty Sabre\VObject\Property
- $parameters array