ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This utility converts vcards from one version to another. More...
Public Member Functions | |
convert (Component\VCard $input, $targetVersion) | |
Converts a vCard object to a new version. More... | |
Protected Member Functions | |
convertProperty (Component\VCard $input, Component\VCard $output, Property $property, $targetVersion) | |
Handles conversion of a single property. More... | |
convertBinaryToUri (Component\VCard $output, Property\Binary $newProperty, array &$parameters) | |
Converts a BINARY property to a URI property. More... | |
convertUriToBinary (Component\VCard $output, Property\Uri $newProperty) | |
Converts a URI property to a BINARY property. More... | |
convertParameters40 (Property $newProperty, array $parameters) | |
Adds parameters to a new property for vCard 4.0. More... | |
convertParameters30 (Property $newProperty, array $parameters) | |
Adds parameters to a new property for vCard 3.0. More... | |
This utility converts vcards from one version to another.
Definition at line 12 of file VCardConverter.php.
Sabre\VObject\VCardConverter::convert | ( | Component\VCard | $input, |
$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.
Component\VCard | $input | |
int | $targetVersion |
Definition at line 32 of file VCardConverter.php.
References Sabre\VObject\$input, Sabre\VObject\$output, Sabre\VObject\VCardConverter\convertProperty(), Sabre\VObject\Document\VCARD21, Sabre\VObject\Document\VCARD30, and Sabre\VObject\Document\VCARD40.
|
protected |
Converts a BINARY property to a URI property.
vCard 4.0 no longer supports BINARY properties.
Component\VCard | $output | |
Property\Uri | $property | The input property. |
$parameters | List of parameters that will eventually be added to the new property. |
Definition at line 276 of file VCardConverter.php.
Referenced by Sabre\VObject\VCardConverter\convertProperty().
|
protected |
Adds parameters to a new property for vCard 3.0.
Property | $newProperty | |
array | $parameters |
Definition at line 429 of file VCardConverter.php.
References Sabre\VObject\Property\add().
Referenced by Sabre\VObject\VCardConverter\convertProperty().
|
protected |
Adds parameters to a new property for vCard 4.0.
Property | $newProperty | |
array | $parameters |
Definition at line 383 of file VCardConverter.php.
References Sabre\VObject\Property\add().
Referenced by Sabre\VObject\VCardConverter\convertProperty().
|
protected |
Handles conversion of a single property.
Component\VCard | $input | |
Component\VCard | $output | |
Property | $property | |
int | $targetVersion |
Definition at line 75 of file VCardConverter.php.
References Sabre\VObject\$output, $x, Sabre\VObject\VCardConverter\convertBinaryToUri(), Sabre\VObject\VCardConverter\convertParameters30(), Sabre\VObject\VCardConverter\convertParameters40(), Sabre\VObject\VCardConverter\convertUriToBinary(), Sabre\VObject\Property\getParts(), Sabre\VObject\Property\getValue(), Sabre\VObject\Property\getValueType(), Sabre\VObject\Property\parameters(), Sabre\VObject\DateTimeParser\parseVCardDateTime(), Sabre\VObject\Document\VCARD30, and Sabre\VObject\Document\VCARD40.
Referenced by Sabre\VObject\VCardConverter\convert().
|
protected |
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.
Component\VCard | $output | |
Property\Uri | $property | The input property. |
Definition at line 330 of file VCardConverter.php.
Referenced by Sabre\VObject\VCardConverter\convertProperty().