Class SyncML_Command_Sync

Description

The SyncML_Command_Sync class provides a SyncML implementation of the Sync command as defined in SyncML Representation Protocol, version 1.1, section 5.5.15.

The Sync command is used to indicate a data synchronization operation. The command handler for the Sync command is the central class to dispatch sync messages.

During parsing of the received XML, the actual sync commands (Add, Replace, Delete) from the client are stored in the $_syncElements attribute. When the output method of SyncML_Command_Sync is called, these elements are processed and the resulting status messages created. Then the server modifications are sent back to the client by the handleSync() method which is called from within the output method.

$Horde: framework/SyncML/SyncML/Command/Sync.php,v 1.17.10.19 2009/10/02 22:40:03 jan Exp $

Copyright 2005-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /SyncML/SyncML/Command/Sync.php (line 34)

SyncML_Command
   |
   --SyncML_Command_Sync
Variable Summary
Method Summary
 void endElement (string $uri, string $element)
 void handleCommand ([ $debug = false])
 void startElement (string $uri, string $element, array $attrs)
Variables
string $_cmdName = 'Sync' (line 41)

Name of the command.


Redefinition of:
SyncML_Command::$_cmdName
Name of the command, like 'Put'.
string $_contentFormat = 'chr' (line 85)

Encoding format of the content as specified in the <Meta><Format> element, like 'b64'.

string $_contentType = 'text/plain' (line 77)

The MIME content type of the currently parsed sync command as specified by the <Type> element inside a <Meta> section.

SyncML_SyncElement $_curItem (line 62)

SyncML_SyncElement object for the currently parsed sync command.

string $_elementType (line 101)

Name of the currently parsed sync command, like 'Add'.

integer $_itemCmdID (line 94)

The command ID (<CmdID>) of the currently parsed sync command.

This is different from the command ID of the <Sync> command itself.

boolean $_itemMoreData (line 109)

Whether a <MoreData> element has indicated that the sync command is split into several SyncML message chunks.

integer $_itemSize (line 117)

The size of the data item of the currently parsed sync command in bytes as specified by a <Size> element.

string $_sourceURI (line 48)

Source database of the <Sync> command.

array $_syncElements = array() (line 69)

List of all SyncML_SyncElement objects that have parsed.

string $_targetURI (line 55)

Target database of the <Sync> command.

Inherited Variables

Inherited from SyncML_Command

SyncML_Command::$_chars
SyncML_Command::$_cmdID
SyncML_Command::$_outputHandler
SyncML_Command::$_stack
Methods
endElement (line 171)

End element handler for the XML parser, delegated from SyncML_ContentHandler::endElement().

void endElement (string $uri, string $element)
  • string $uri: The namespace URI of the element.
  • string $element: The element tag name.

Redefinition of:
SyncML_Command::endElement()
End element handler for the XML parser, delegated from SyncML_ContentHandler::endElement().
handleCommand (line 272)

Implements the actual business logic of the Sync command.

void handleCommand ([ $debug = false])
  • $debug

Redefinition of:
SyncML_Command::handleCommand()
This method is supposed to implement the actual business logic of the command once the XML parsing is complete.
startElement (line 127)

Start element handler for the XML parser, delegated from SyncML_ContentHandler::startElement().

void startElement (string $uri, string $element, array $attrs)
  • string $uri: The namespace URI of the element.
  • string $element: The element tag name.
  • array $attrs: A hash with the element's attributes.

Redefinition of:
SyncML_Command::startElement()
Start element handler for the XML parser, delegated from SyncML_ContentHandler::startElement().
_outputStatus (line 338)

Creates the <Status> response for one Add|Replace|Delete SyncElement.

void _outputStatus (SyncML_SyncElement $element)

Inherited Methods

Inherited From SyncML_Command

 SyncML_Command::SyncML_Command()
 SyncML_Command::characters()
 SyncML_Command::endElement()
 SyncML_Command::factory()
 SyncML_Command::getCommandName()
 SyncML_Command::handleCommand()
 SyncML_Command::startElement()

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