PHP Class Horde_SyncMl_ContentHandler, horde

Author: Karsten Fourmont ([email protected])
Author: Anthony Mills ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$debug

Protected Properties

Property Type Description
$_Stack array Stack for holding the xml elements during creation of the object from the xml event flow.
$_chars string
$_currentCommand Horde_SyncMl_Command Instance of Horde_SyncMl_Command. Events are passed through to this ContentHandler.
$_gotFinal Whether we received a final element in this message.
$_respURI string This is the endpoint URL of the RPC server.
$_wbxmlparser
$_xmlWriter

Public Methods

Method Description
__construct ( )
characters ( $str ) Callback public function called by WBXML parser.
endElement ( $uri, $element ) Callback public function called by WBXML parser.
getOutput ( ) : string Returns the XML|WBXML output once processing is finished.
handleCommand ( &$cmd ) Processes one command after it has been completely parsed.
handleEnd ( ) Finishes the response.
handleHeader ( &$hdr ) Handles the header logic.
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.
startElement ( $uri, $element, $attrs ) Callback public function called by WBXML parser.

Protected Methods

Method Description
_characters ( $parser, $chars ) Callback public function called by XML parser.
_endElement ( $parser, $tag ) Callback public function called by XML parser.
_splitURI ( $tag ) Splits an URI as provided by the XML parser.
_startElement ( $parser, $tag, $attributes ) Callback public function called by XML parser.

Method Details

__construct() public method

public __construct ( )

_characters() protected method

Callback public function called by XML parser.
protected _characters ( $parser, $chars )

_endElement() protected method

Callback public function called by XML parser.
protected _endElement ( $parser, $tag )

_splitURI() protected method

Splits an URI as provided by the XML parser.
protected _splitURI ( $tag )

_startElement() protected method

Callback public function called by XML parser.
protected _startElement ( $parser, $tag, $attributes )

characters() public method

Callback public function called by WBXML parser.
public characters ( $str )

endElement() public method

Callback public function called by WBXML parser.
public endElement ( $uri, $element )

getOutput() public method

Returns the XML|WBXML output once processing is finished.
public getOutput ( ) : string
return string The XML or WBXML output data.

handleCommand() public method

Invoked after a command is parsed.
public handleCommand ( &$cmd )

handleEnd() public method

Invoked after complete message is parsed.
public handleEnd ( )

handleHeader() public method

Invoked after header is parsed.
public handleHeader ( &$hdr )

process() public method

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 )
$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 The url of the server endpoint. Will be returned in the RespURI element.

startElement() public method

Callback public function called by WBXML parser.
public startElement ( $uri, $element, $attrs )

Property Details

$_Stack protected_oe property

Stack for holding the xml elements during creation of the object from the xml event flow.
protected array $_Stack
return array

$_chars protected_oe property

protected string $_chars
return string

$_currentCommand protected_oe property

Instance of Horde_SyncMl_Command. Events are passed through to this ContentHandler.
protected Horde_SyncMl_Command $_currentCommand
return Horde_SyncMl_Command

$_gotFinal protected_oe property

Whether we received a final element in this message.
protected $_gotFinal

$_respURI protected_oe property

This is the endpoint URL of the RPC server.
protected string $_respURI
return string

$_wbxmlparser protected_oe property

protected $_wbxmlparser

$_xmlWriter protected_oe property

protected $_xmlWriter

$debug public_oe property

public $debug