Documentation

Horde_SyncMl_Command_SyncHdr extends Horde_SyncMl_Command
in package

The Horde_SyncMl_Command_SyncHdr class provides a SyncML implementation of the SyncHdr as defined in SyncML Representation Protocol, version 1.1, section 5.2.2.

SyncHdr is not really a sync command, but this class takes advantage of the XML parser in Horde_SyncMl_Command.

Copyright 2006-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
author

Karsten Fourmont karsten@horde.org

author

Jan Schneider jan@horde.org

Table of Contents

$credData  : string
Authentication credential as specified by the <Cred><Data> element.
$credFormat  : string
Encoding format of $credData as specified in the <Cred><Meta><Format> element like 'b64'.
$credType  : string
Media type of $credData as specified in the <Cred><Meta><Type> element like 'auth-basic'.
$user  : string
Username as specified in the <LocName> element.
$_chars  : string
Buffer for the parsed character data.
$_cmdID  : int
The command ID (<CmdID>).
$_cmdName  : string
Name of the command.
$_maxMsgSize  : int
Maximum size of a SyncML message in bytes as specified by the <Meta><MaxMsgSize> element.
$_maxObjSize  : int
Maximum size of a SyncML object in bytes as specified by the <Meta><MaxObjSize> element.
$_message  : int
Id of the current message as specified in the <MsgID> element.
$_outputHandler  : Horde_SyncMl_XmlOutput
A Horde_SyncMl_XmlOutput instance responsible for generating the output.
$_sessionID  : string
Id of this SyncML session as specified in the <SessionID> element.
$_sourceURI  : string
The source URI as specified by the <Source><LocURI> element.
$_stack  : array<string|int, mixed>
Stack for holding the XML elements during creation of the object from the XML event flow.
$_targetURI  : string
The target URI as specified by the <Target><LocURI> element.
$_version  : int
SyncML protocol version as specified in the <VerProto> element.
__construct()  : mixed
Constructor.
characters()  : mixed
Character data handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::characters().
endElement()  : mixed
End element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::endElement().
factory()  : Horde_SyncMl_Command
Attempts to return a concrete Horde_SyncMl_Command instance based on $command.
getCommandName()  : string
Returns the command name this instance is reponsible for.
handleCommand()  : mixed
This method is supposed to implement the actual business logic of the command once the XML parsing is complete.
setupState()  : mixed
Starts the PHP session and instantiates the global Horde_SyncMl_State object if doesn't exist yet.
startElement()  : mixed
Start element handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::startElement().

Properties

$credData

Authentication credential as specified by the <Cred><Data> element.

public string $credData

$credFormat

Encoding format of $credData as specified in the <Cred><Meta><Format> element like 'b64'.

public string $credFormat

$credType

Media type of $credData as specified in the <Cred><Meta><Type> element like 'auth-basic'.

public string $credType

$user

Username as specified in the <LocName> element.

public string $user

$_chars

Buffer for the parsed character data.

protected string $_chars = ''

$_cmdID

The command ID (<CmdID>).

protected int $_cmdID

$_cmdName

Name of the command.

protected string $_cmdName = 'SyncHdr'

$_maxMsgSize

Maximum size of a SyncML message in bytes as specified by the <Meta><MaxMsgSize> element.

protected int $_maxMsgSize

$_maxObjSize

Maximum size of a SyncML object in bytes as specified by the <Meta><MaxObjSize> element.

protected int $_maxObjSize

$_message

Id of the current message as specified in the <MsgID> element.

protected int $_message

$_sessionID

Id of this SyncML session as specified in the <SessionID> element.

protected string $_sessionID

This is not to confuse with the PHP session id, though it is part of the generated PHP session id.

$_sourceURI

The source URI as specified by the <Source><LocURI> element.

protected string $_sourceURI

$_stack

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

protected array<string|int, mixed> $_stack = array()

$_targetURI

The target URI as specified by the <Target><LocURI> element.

protected string $_targetURI

This is normally the URL of the Horde RPC server. However the client is free to send anything.

$_version

SyncML protocol version as specified in the <VerProto> element.

protected int $_version

0 for SyncML 1.0, 1 for SyncML 1.1, etc.

Methods

characters()

Character data handler for the XML parser, delegated from Horde_SyncMl_ContentHandler::characters().

public characters(string $str) : mixed
Parameters
$str : string

The data string.

Return values
mixed —

endElement()

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

public endElement(string $uri, string $element) : mixed
Parameters
$uri : string

The namespace URI of the element.

$element : string

The element tag name.

Return values
mixed —

factory()

Attempts to return a concrete Horde_SyncMl_Command instance based on $command.

public factory(string $command, Horde_SyncMl_XmlOutput &$outputHandler) : Horde_SyncMl_Command
Parameters
$command : string

The type of the concrete Horde_SyncMl_Comment subclass to return.

$outputHandler : Horde_SyncMl_XmlOutput

A Horde_SyncMl_XmlOutput object.

Return values
Horde_SyncMl_Command —

The newly created concrete Horde_SyncMl_Command instance, or false on error.

getCommandName()

Returns the command name this instance is reponsible for.

public getCommandName() : string
Return values
string —

The command name this object is handling.

handleCommand()

This method is supposed to implement the actual business logic of the command once the XML parsing is complete.

public handleCommand([mixed $debug = false ]) : mixed
Parameters
$debug : mixed = false
Tags
abstract
Return values
mixed —

setupState()

Starts the PHP session and instantiates the global Horde_SyncMl_State object if doesn't exist yet.

public setupState() : mixed
Return values
mixed —

startElement()

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

public startElement(string $uri, string $element, array<string|int, mixed> $attrs) : mixed
Parameters
$uri : string

The namespace URI of the element.

$element : string

The element tag name.

$attrs : array<string|int, mixed>

A hash with the element's attributes.

Return values
mixed —

Search results