PHP Class Horde_SyncMl_State, horde

Copyright 2003-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: Anthony Mills ([email protected])
Author: Jan Schneider ([email protected])
Afficher le fichier Open project: horde/horde

Méthodes publiques

Свойство Type Description
$authenticated boolean Whether this session has authenticated successfully.
$curSyncItem Horde_SyncMl_SyncElement Stored in state if one element is split into multiple message packets.
$delayedFinal boolean Flag that is set if the client sends a Final but we are not finished with the current package and thus can't final this package yet.
$deviceInfo Horde_SyncMl_DeviceInfo Device info provided by the SyncML DevInf data.
$maxMsgSize integer The maximum allowed message size in bytes.
$maxObjSize integer The maximum allowed object size in bytes.
$messageID integer Id of the current message.
$serverChanges array The list of all server changes being sent to the client as a reference for Status responses from the client.
$sessionID string This is not to confuse with the PHP session id, though it is part of the generated PHP session id.
$sourceURI string Can be used to identify the client and is part of the PHP session id.
$targetURI string This is normally the URL of the RPC server. However the client is free to send anything.
$uriDevInf string namespace uri.
$uriMeta string namespace uri.
$user string Username used to authenticate with the backend.
$version integer 0 for SyncML 1.0, 1 for SyncML 1.1, etc.
$wbxml boolean Whether WBXML encoding is used.

Protected Properties

Свойство Type Description
$_deviceDriver string Name of the appropriate device driver.
$_syncs array Array of Horde_SyncMl_Sync objects.
$_uri string namespace uri.

Méthodes publiques

Méthode Description
__construct ( $sourceURI, $user, $sessionID ) Constructor.
getDevInfURI ( ) Returns the DevInf URI based on the protocol version.
getDevice ( ) : Horde_SyncMl_Device Returns a Horde_SyncMl_Device instance for the device used in this session.
getPendingSyncs ( ) : array Returns all syncs which have pending elements left.
getProtocolName ( ) Returns the protocol name based on the protocol version.
getSync ( string $target ) : Horde_SyncMl_Sync
getSyncs ( ) : array
getURI ( ) : string Returns the namespace URI for the element.
getVerDTD ( ) Returns the content based on the protocol version.
handleFinal ( &$output, $debug = false ) Propagates final tags here and then further to every sync.
hasPendingSyncs ( ) : boolean Returns whether there are any pending elements that have not been sent to due to message size restrictions. These will be sent int the next message.
isAllSyncsComplete ( ) : boolean Returns whether all syncs are in completed state or no syncs are present.
setSync ( string $target, Horde_SyncMl_Sync $sync )
setVersion ( integer $version ) Sets the protocol version

Method Details

__construct() public méthode

Constructor.
public __construct ( $sourceURI, $user, $sessionID )

getDevInfURI() public méthode

Returns the DevInf URI based on the protocol version.
public getDevInfURI ( )

getDevice() public méthode

Returns a Horde_SyncMl_Device instance for the device used in this session.
public getDevice ( ) : Horde_SyncMl_Device
Résultat Horde_SyncMl_Device A Horde_SyncMl_Device instance.

getPendingSyncs() public méthode

Returns all syncs which have pending elements left.
public getPendingSyncs ( ) : array
Résultat array Array of TargetLocURIs which can be used as a key in getSync() calls.

getProtocolName() public méthode

Returns the protocol name based on the protocol version.
public getProtocolName ( )

getSync() public méthode

public getSync ( string $target ) : Horde_SyncMl_Sync
$target string
Résultat Horde_SyncMl_Sync

getSyncs() public méthode

public getSyncs ( ) : array
Résultat array

getURI() public méthode

Returns the namespace URI for the element.
public getURI ( ) : string
Résultat string The namespace URI to use, if any.

getVerDTD() public méthode

Returns the content based on the protocol version.
public getVerDTD ( )

handleFinal() public méthode

This allows the sync objects to determine if they are complete.
public handleFinal ( &$output, $debug = false )

hasPendingSyncs() public méthode

Returns whether there are any pending elements that have not been sent to due to message size restrictions. These will be sent int the next message.
public hasPendingSyncs ( ) : boolean
Résultat boolean True if there are pending elements that have yet to be sent.

isAllSyncsComplete() public méthode

Returns whether all syncs are in completed state or no syncs are present.
public isAllSyncsComplete ( ) : boolean
Résultat boolean True if all syncs are in completed state.

setSync() public méthode

public setSync ( string $target, Horde_SyncMl_Sync $sync )
$target string
$sync Horde_SyncMl_Sync

setVersion() public méthode

Sets the protocol version
public setVersion ( integer $version )
$version integer The protocol version: 0 for SyncML 1.0, 1 for SyncML 1.1 etc.

Property Details

$_deviceDriver protected_oe property

Name of the appropriate device driver.
protected string $_deviceDriver
Résultat string

$_syncs protected_oe property

Array of Horde_SyncMl_Sync objects.
protected array $_syncs
Résultat array

$_uri protected_oe property

namespace uri.
protected string $_uri
Résultat string

$authenticated public_oe property

Whether this session has authenticated successfully.
public bool $authenticated
Résultat boolean

$curSyncItem public_oe property

Stored in state if one element is split into multiple message packets.
public Horde_SyncMl_SyncElement $curSyncItem
Résultat Horde_SyncMl_SyncElement

$delayedFinal public_oe property

Flag that is set if the client sends a Final but we are not finished with the current package and thus can't final this package yet.
public bool $delayedFinal
Résultat boolean

$deviceInfo public_oe property

Device info provided by the SyncML DevInf data.
public Horde_SyncMl_DeviceInfo $deviceInfo
Résultat Horde_SyncMl_DeviceInfo

$maxMsgSize public_oe property

The maximum allowed message size in bytes.
public int $maxMsgSize
Résultat integer

$maxObjSize public_oe property

The maximum allowed object size in bytes.
public int $maxObjSize
Résultat integer

$messageID public_oe property

Id of the current message.
public int $messageID
Résultat integer

$serverChanges public_oe property

The list of all server changes being sent to the client as a reference for Status responses from the client.
public array $serverChanges
Résultat array

$sessionID public_oe property

This is not to confuse with the PHP session id, though it is part of the generated PHP session id.
public string $sessionID
Résultat string

$sourceURI public_oe property

Can be used to identify the client and is part of the PHP session id.
public string $sourceURI
Résultat string

$targetURI public_oe property

This is normally the URL of the RPC server. However the client is free to send anything.
public string $targetURI
Résultat string

$uriDevInf public_oe property

namespace uri.
public string $uriDevInf
Résultat string

$uriMeta public_oe property

namespace uri.
public string $uriMeta
Résultat string

$user public_oe property

Username used to authenticate with the backend.
public string $user
Résultat string

$version public_oe property

0 for SyncML 1.0, 1 for SyncML 1.1, etc.
public int $version
Résultat integer

$wbxml public_oe property

Whether WBXML encoding is used.
public bool $wbxml
Résultat boolean