PHP Class Horde_SyncMl_Device_sync4j, horde

The Sync4J outlook converter uses its native SIF format for data exchange. Conversion to text/vcalendar etc. is done by SifConverter.php The connector seems not support DevInf information, so Horde_SyncMl_Device can only detect it by the decice ID: so in the connector configuration the device ID must be set to 'sc-pim-' which should be the default anyhow. Copyright 2005-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Karsten Fourmont ([email protected])
Inheritance: extends Horde_SyncMl_Device
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Méthode Description
array2sif ( array $array, string $pre = '', string $post = '' ) : string Converts a hash to a SIF XML structure.
convertClient2Server ( $content, $contentType ) Convert the content.
convertServer2Client ( string $content, string $contentType, string $database ) : array Converts the content from the backend to a format suitable for the client device.
getPreferredContentTypeClient ( $serverSyncURI, $sourceSyncURI )
sif2array ( string $sif ) : array Decodes a sif xml string to an associative array.
sif2vcard ( $sif )
sif2vevent ( $sif )
sif2vnote ( $sif )
sif2vtodo ( $sif )
useCdataTag ( ) Sync4j as of Funambol Outlook connector 3.0.15 can't deal with
vcard2sif ( $vcard )
vevent2sif ( $vcard )
vnote2sif ( $vnote )
vtodo2sif ( $vcard )

Method Details

array2sif() public méthode

Converts a hash to a SIF XML structure.
public array2sif ( array $array, string $pre = '', string $post = '' ) : string
$array array A hash.
$pre string A prefix string for the XML result.
$post string A suffix string for the XML result.
Résultat string The resulting XML string.

convertClient2Server() public méthode

Convert the content.
public convertClient2Server ( $content, $contentType )

convertServer2Client() public méthode

Strips the uid (primary key) information as client and server might use different ones.
public convertServer2Client ( string $content, string $contentType, string $database ) : array
$content string The content to convert
$contentType string The content type of content as returned from the backend
$database string The server database URI.
Résultat array Three-element array with the converted content, the (possibly changed) new content type, and encoding type (like b64 as used by Funambol).

getPreferredContentTypeClient() public méthode

public getPreferredContentTypeClient ( $serverSyncURI, $sourceSyncURI )

sif2array() public méthode

Quick hack to convert from text/vcard and text/vcalendar to Sync4J's proprietery sif datatypes and vice versa. For details about the sif format see the appendix of the developer guide on www.sync4j.org.
public sif2array ( string $sif ) : array
$sif string A sif string like v1>v2
Résultat array Assoc array in utf8 like array ('k1' => 'v1>', 'k2' => 'v2');

sif2vcard() public méthode

public sif2vcard ( $sif )

sif2vevent() public méthode

public sif2vevent ( $sif )

sif2vnote() public méthode

public sif2vnote ( $sif )

sif2vtodo() public méthode

public sif2vtodo ( $sif )

useCdataTag() public méthode

The Funambol Sync4j client chokes on the cdata so for this device it has to be set to false. Syn4j uses base64 encoding and so the problems with escaping does not occur.
public useCdataTag ( )

vcard2sif() public méthode

public vcard2sif ( $vcard )

vevent2sif() public méthode

public vevent2sif ( $vcard )

vnote2sif() public méthode

public vnote2sif ( $vnote )

vtodo2sif() public méthode

public vtodo2sif ( $vcard )