Documentation

Horde_SyncMl_ContentHandler
in package

There is one global object used by SyncML: 1) $GLOBALS['backend'] Backend to handle the communication with the datastore.

Tags
todo:

Main Todos:

  • ensure that no server data is written for Horde_SyncMl::ALERT_ONE_WAY_FROM_SERVER even when client sends data (security!)
  • consinstant naming of clientSyncDB (currently called targetLocURI, db or synctype)
  • tackle the AddReplace issue: when a Replace is issued (i.e. during SlowSync) the server should first check if the entry already exists. Like: does a calendar entry with the same timeframe, same subject and location exist. If so, the replace should replace this value rather than create a new one as a duplicate.

Copyright 2003-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

author

Karsten Fourmont karsten@horde.org

author

Anthony Mills amills@pyramid6.com

Table of Contents

$debug  : mixed
$_chars  : string
$_currentCommand  : Horde_SyncMl_Command
Instance of Horde_SyncMl_Command. Events are passed through to this ContentHandler.
$_gotFinal  : mixed
Whether we received a final element in this message.
$_respURI  : string
The response URI as sent by the server.
$_Stack  : array<string|int, mixed>
Stack for holding the xml elements during creation of the object from the xml event flow.
$_wbxmlparser  : mixed
$_xmlWriter  : mixed
__construct()  : mixed
characters()  : mixed
Callback public function called by WBXML parser.
endElement()  : mixed
Callback public function called by WBXML parser.
getOutput()  : string
Returns the XML|WBXML output once processing is finished.
handleCommand()  : mixed
Processes one command after it has been completely parsed.
handleEnd()  : mixed
Finishes the response.
handleHeader()  : mixed
Handles the header logic.
process()  : mixed
Here's were all the processing takes place: gets the SyncML request data and returns a SyncML response. The only thing that needs to be in place before invoking this public function is a working backend.
startElement()  : mixed
Callback public function called by WBXML parser.
_characters()  : mixed
Callback public function called by XML parser.
_endElement()  : mixed
Callback public function called by XML parser.
_splitURI()  : mixed
Splits an URI as provided by the XML parser.
_startElement()  : mixed
Callback public function called by XML parser.

Properties

$_gotFinal

Whether we received a final element in this message.

protected mixed $_gotFinal = alse

$_respURI

The response URI as sent by the server.

protected string $_respURI

This is the endpoint URL of the RPC server.

$_Stack

Stack for holding the xml elements during creation of the object from the xml event flow.

protected array<string|int, mixed> $_Stack = array()

Methods

__construct()

public __construct() : mixed
Return values
mixed

characters()

Callback public function called by WBXML parser.

public characters(mixed $str) : mixed
Parameters
$str : mixed
Return values
mixed

endElement()

Callback public function called by WBXML parser.

public endElement(mixed $uri, mixed $element) : mixed
Parameters
$uri : mixed
$element : mixed
Return values
mixed

getOutput()

Returns the XML|WBXML output once processing is finished.

public getOutput() : string
Return values
string

The XML or WBXML output data.

handleCommand()

Processes one command after it has been completely parsed.

public handleCommand(mixed &$cmd) : mixed

Invoked after a command is parsed.

Parameters
$cmd : mixed
Return values
mixed

handleEnd()

Finishes the response.

public handleEnd() : mixed

Invoked after complete message is parsed.

Return values
mixed

handleHeader()

Handles the header logic.

public handleHeader(mixed &$hdr) : mixed

Invoked after header is parsed.

Parameters
$hdr : mixed
Return values
mixed

process()

Here's were all the processing takes place: gets the SyncML request data and returns a SyncML response. The only thing that needs to be in place before invoking this public function is a working backend.

public process(string $request, string $contentType[, string $respURI = null ]) : mixed
Parameters
$request : string

The raw request string.

$contentType : string

The MIME content type of the request. Should be either application/vnd.syncml or application/vnd.syncml+wbxml.

$respURI : string = null

The url of the server endpoint. Will be returned in the RespURI element.

Return values
mixed

startElement()

Callback public function called by WBXML parser.

public startElement(mixed $uri, mixed $element, mixed $attrs) : mixed
Parameters
$uri : mixed
$element : mixed
$attrs : mixed
Return values
mixed

_characters()

Callback public function called by XML parser.

protected _characters(mixed $parser, mixed $chars) : mixed
Parameters
$parser : mixed
$chars : mixed
Return values
mixed

_endElement()

Callback public function called by XML parser.

protected _endElement(mixed $parser, mixed $tag) : mixed
Parameters
$parser : mixed
$tag : mixed
Return values
mixed

_splitURI()

Splits an URI as provided by the XML parser.

protected _splitURI(mixed $tag) : mixed
Parameters
$tag : mixed
Return values
mixed

_startElement()

Callback public function called by XML parser.

protected _startElement(mixed $parser, mixed $tag, mixed $attributes) : mixed
Parameters
$parser : mixed
$tag : mixed
$attributes : mixed
Return values
mixed

Search results