\Horde_SyncMl_ContentHandler

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

Summary

Methods
Properties
Constants
__construct()
process()
getOutput()
startElement()
endElement()
characters()
handleHeader()
handleCommand()
handleEnd()
$debug
No constants found
_startElement()
_characters()
_endElement()
_splitURI()
$_Stack
$_chars
$_currentCommand
$_gotFinal
$_xmlWriter
$_wbxmlparser
$_respURI
N/A
No private methods found
No private properties found
N/A

Properties

$debug

$debug : 

Type

$_Stack

$_Stack : array

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

Type

array

$_chars

$_chars : string

Type

string

$_currentCommand

$_currentCommand : \Horde_SyncMl_Command

Instance of Horde_SyncMl_Command. Events are passed through to this ContentHandler.

Type

\Horde_SyncMl_Command

$_gotFinal

$_gotFinal : 

Whether we received a final element in this message.

Type

$_xmlWriter

$_xmlWriter : 

Type

$_wbxmlparser

$_wbxmlparser : 

Type

$_respURI

$_respURI : string

The response URI as sent by the server.

This is the endpoint URL of the RPC server.

Type

string

Methods

__construct()

__construct() 

process()

process(string  $request, string  $contentType, string  $respURI = null) 

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.

Parameters

string $request

The raw request string.

string $contentType

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

string $respURI

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

getOutput()

getOutput() : string

Returns the XML|WBXML output once processing is finished.

Returns

string —

The XML or WBXML output data.

startElement()

startElement(  $uri,   $element,   $attrs) 

Callback public function called by WBXML parser.

Parameters

$uri
$element
$attrs

endElement()

endElement(  $uri,   $element) 

Callback public function called by WBXML parser.

Parameters

$uri
$element

characters()

characters(  $str) 

Callback public function called by WBXML parser.

Parameters

$str

handleHeader()

handleHeader(  $hdr) 

Handles the header logic.

Invoked after header is parsed.

Parameters

$hdr

handleCommand()

handleCommand(  $cmd) 

Processes one command after it has been completely parsed.

Invoked after a command is parsed.

Parameters

$cmd

handleEnd()

handleEnd() 

Finishes the response.

Invoked after complete message is parsed.

_startElement()

_startElement(  $parser,   $tag,   $attributes) 

Callback public function called by XML parser.

Parameters

$parser
$tag
$attributes

_characters()

_characters(  $parser,   $chars) 

Callback public function called by XML parser.

Parameters

$parser
$chars

_endElement()

_endElement(  $parser,   $tag) 

Callback public function called by XML parser.

Parameters

$parser
$tag

_splitURI()

_splitURI(  $tag) 

Splits an URI as provided by the XML parser.

Parameters

$tag