Class SyncML_ContentHandler

Description

Located in /SyncML/SyncML.php (line 45)


	
			
Variable Summary
Method Summary
 SyncML_ContentHandler SyncML_ContentHandler ()
 void characters ( $str)
 void endElement ( $uri,  $element)
 string getOutput ()
 void handleCommand ( &$cmd)
 void handleEnd ()
 void handleHeader ( &$hdr)
 void process (string $request, string $contentType, [string $respURI = null])
 void startElement ( $uri,  $element,  $attrs)
 void _characters ( $parser,  $chars)
 void _endElement ( $parser,  $tag)
 void _splitURI ( $tag)
 void _startElement ( $parser,  $tag,  $attributes)
Variables
mixed $debug = false (line 86)
string $_chars (line 58)
SyncML_Command $_currentCommand (line 66)

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

mixed $_gotFinal = false (line 71)

Whether we received a final element in this message.

string $_respURI (line 84)

The response URI as sent by the server.

This is the endpoint URL of the RPC server.

array $_Stack = array() (line 53)

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

mixed $_wbxmlparser = null (line 75)
mixed $_xmlWriter (line 73)
Methods
Constructor SyncML_ContentHandler (line 88)
SyncML_ContentHandler SyncML_ContentHandler ()
characters (line 353)

Callback function called by WBXML parser.

void characters ( $str)
  • $str
endElement (line 297)

Callback function called by WBXML parser.

void endElement ( $uri,  $element)
  • $uri
  • $element
getOutput (line 214)

Returns the XML|WBXML output once processing is finished.

  • return: The XML or WBXML output data.
string getOutput ()
handleCommand (line 449)

Processes one command after it has been completely parsed.

Invoked after a command is parsed.

void handleCommand ( &$cmd)
  • &$cmd
handleEnd (line 469)

Finishes the response.

Invoked after complete message is parsed.

void handleEnd ()
handleHeader (line 378)

Handles the header logic.

Invoked after header is parsed.

void handleHeader ( &$hdr)
  • &$hdr
process (line 108)

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 function is a working backend.

void process (string $request, string $contentType, [string $respURI = null])
  • 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.
startElement (line 259)

Callback function called by WBXML parser.

void startElement ( $uri,  $element,  $attrs)
  • $uri
  • $element
  • $attrs
_characters (line 231)

Callback function called by XML parser.

void _characters ( $parser,  $chars)
  • $parser
  • $chars
_endElement (line 239)

Callback function called by XML parser.

void _endElement ( $parser,  $tag)
  • $parser
  • $tag
_splitURI (line 248)

Splits an URI as provided by the XML parser.

void _splitURI ( $tag)
  • $tag
_startElement (line 222)

Callback function called by XML parser.

void _startElement ( $parser,  $tag,  $attributes)
  • $parser
  • $tag
  • $attributes

Documentation generated on Sun, 30 Jan 2011 05:22:34 +0000 by phpDocumentor 1.4.3