PHP Class Horde_SyncMl_Command_Sync, horde

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 Horde_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. Copyright 2005-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Karsten Fourmont ([email protected])
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_SyncMl_Command
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_cmdName string Name of the command.
$_contentFormat string Encoding format of the content as specified in the element, like 'b64'.
$_contentType string The MIME content type of the currently parsed sync command as specified by the element inside a section.
$_curItem Horde_SyncMl_SyncElement Horde_SyncMl_SyncElement object for the currently parsed sync command.
$_elementType string Name of the currently parsed sync command, like 'Add'.
$_itemCmdID integer This is different from the command ID of the command itself.
$_itemMoreData boolean Whether a element has indicated that the sync command is split into several SyncML message chunks.
$_itemSize integer The size of the data item of the currently parsed sync command in bytes as specified by a element.
$_sourceURI string Source database of the command.
$_syncElements array List of all Horde_SyncMl_SyncElement objects that have parsed.
$_targetURI string Target database of the command.

Public Methods

Method Description
endElement ( string $uri, string $element ) End element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::endElement().
handleCommand ( $debug = false ) Implements the actual business logic of the Sync command.
startElement ( string $uri, string $element, array $attrs ) Start element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::startElement().

Protected Methods

Method Description
_outputStatus ( Horde_SyncMl_SyncElement $element ) Creates the response for one Add|Replace|Delete SyncElement.

Method Details

_outputStatus() protected method

Creates the response for one Add|Replace|Delete SyncElement.
protected _outputStatus ( Horde_SyncMl_SyncElement $element )
$element Horde_SyncMl_SyncElement The element for which the status is to be created.

endElement() public method

End element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::endElement().
public endElement ( string $uri, string $element )
$uri string The namespace URI of the element.
$element string The element tag name.

handleCommand() public method

Implements the actual business logic of the Sync command.
public handleCommand ( $debug = false )

startElement() public method

Start element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::startElement().
public startElement ( string $uri, string $element, array $attrs )
$uri string The namespace URI of the element.
$element string The element tag name.
$attrs array A hash with the element's attributes.

Property Details

$_cmdName protected_oe property

Name of the command.
protected string $_cmdName
return string

$_contentFormat protected_oe property

Encoding format of the content as specified in the element, like 'b64'.
protected string $_contentFormat
return string

$_contentType protected_oe property

The MIME content type of the currently parsed sync command as specified by the element inside a section.
protected string $_contentType
return string

$_curItem protected_oe property

Horde_SyncMl_SyncElement object for the currently parsed sync command.
protected Horde_SyncMl_SyncElement $_curItem
return Horde_SyncMl_SyncElement

$_elementType protected_oe property

Name of the currently parsed sync command, like 'Add'.
protected string $_elementType
return string

$_itemCmdID protected_oe property

This is different from the command ID of the command itself.
protected int $_itemCmdID
return integer

$_itemMoreData protected_oe property

Whether a element has indicated that the sync command is split into several SyncML message chunks.
protected bool $_itemMoreData
return boolean

$_itemSize protected_oe property

The size of the data item of the currently parsed sync command in bytes as specified by a element.
protected int $_itemSize
return integer

$_sourceURI protected_oe property

Source database of the command.
protected string $_sourceURI
return string

$_syncElements protected_oe property

List of all Horde_SyncMl_SyncElement objects that have parsed.
protected array $_syncElements
return array

$_targetURI protected_oe property

Target database of the command.
protected string $_targetURI
return string