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
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
$debug
public
mixed
$debug
= alse
$_chars
protected
string
$_chars
$_currentCommand
Instance of Horde_SyncMl_Command. Events are passed through to this ContentHandler.
protected
Horde_SyncMl_Command
$_currentCommand
$_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()
$_wbxmlparser
protected
mixed
$_wbxmlparser
=
ull
$_xmlWriter
protected
mixed
$_xmlWriter
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