PHP Class Horde_SyncMl_Device_Synthesis, horde

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
Datei anzeigen Open project: horde/horde

Public Methods

Method Description
UTC2LocalDate ( $s ) * Static helper function: converts a UTC Timestamp like 20060418T220000Z into a local date like 20060419T000000. This is actually more than stripping the time part: we need to convert to local time first to ensure we get the right date!
convertClient2Server ( string $content, string $contentType ) : array 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.

Method Details

UTC2LocalDate() public method

* Static helper function: converts a UTC Timestamp like 20060418T220000Z into a local date like 20060419T000000. This is actually more than stripping the time part: we need to convert to local time first to ensure we get the right date!
public UTC2LocalDate ( $s )

convertClient2Server() public method

Convert the content.
public convertClient2Server ( string $content, string $contentType ) : array
$content string The content to convert.
$contentType string The contentType of the content.
return array array($newcontent, $newcontentType): the converted content and the (possibly changed) new ContentType.

convertServer2Client() public method

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.
return array Three-element array with the converted content, the (possibly changed) new content type, and encoding type (like b64 as used by Funambol).