Horde_SyncMl_Device_sync4j::convertClient2Server PHP Method

convertClient2Server() public method

Convert the content.
public convertClient2Server ( $content, $contentType )
    public function convertClient2Server($content, $contentType)
    {
        list($content, $contentType) = parent::convertClient2Server($content, $contentType);
        switch ($contentType) {
            case 'text/x-s4j-sifn':
            case 'text/x-sifn':
                $content = Horde_SyncMl_Device_sync4j::sif2vnote($content);
                $contentType = 'text/x-vnote';
                break;
            case 'text/x-s4j-sifc':
            case 'text/x-sifc':
                $content = Horde_SyncMl_Device_sync4j::sif2vcard($content);
                $contentType = 'text/x-vcard';
                break;
            case 'text/x-s4j-sife':
            case 'text/x-sife':
                $content = Horde_SyncMl_Device_sync4j::sif2vevent($content);
                $contentType = 'text/calendar';
                break;
            case 'text/x-s4j-sift':
            case 'text/x-sift':
                $content = Horde_SyncMl_Device_sync4j::sif2vtodo($content);
                $contentType = 'text/calendar';
                break;
            case 'text/calendar':
            case 'text/x-vcalendar':
                $si = $GLOBALS['backend']->state->sourceURI;
                if (stristr($si, 'fol-') !== false) {
                    // The Funambol Outlook connector uses invalid STATUS
                    // values. Actually it maps MeetingStatus values of the
                    // Outlook event to the STATUS property, which is
                    // completely useless. So drop the STATUS altogether.
                    $content = preg_replace('/^STATUS:.*\\r?\\n/im', '', $content);
                }
                break;
        }
        $GLOBALS['backend']->logFile(Horde_SyncMl_Backend::LOGFILE_DATA, "\nInput converted for server ({$contentType}):\n{$content}\n");
        return array($content, $contentType);
    }