PHP Class Horde_ActiveSync, horde

Author: Michael J Rubinsky ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_certPath string Path to root certificate bundle
$_collectionsObj Horde_ActiveSync_Collections The singleton collections handler.
$_compression boolean Support gzip compression of certain data parts?
$_decoder Horde_ActiveSync_Wbxml_Decoder Wbxml decoder
$_device Horde_ActiveSync_Device
$_encoder Horde_ActiveSync_Wbxml_Encoder Wbxml encoder
$_get array Local cache of Get variables/decoded base64 uri
$_globalError boolean Global error flag.
$_logger Horde_Log_Logger The logger for this class.
$_loggerFactory Horde_ActiveSync_Interface_LoggerFactory Logger
$_maxVersion float Highest version to support.
$_multipart boolean Multipart support?
$_needMsRp boolean Flag to indicate we need to update the device version.
$_procid integer Process id (used in logging).
$_provisioning string Provisioning support
$_supportedVersions array Supported EAS versions.
$_version float The actual version we are supporting.

Méthodes publiques

Méthode Description
__construct ( Horde_ActiveSync_Driver_Base $driver, Horde_ActiveSync_Wbxml_Decoder $decoder, Horde_ActiveSync_Wbxml_Encoder $encoder, Horde_ActiveSync_State_Base $state, Horde_Controller_Request_Http $request ) : Horde_ActiveSync Const'r
__get ( string $property ) : mixed Getter
activeSyncHeader ( ) Send the MS_Server-ActiveSync header.
authenticate ( Horde_ActiveSync_Credentials $credentials ) : boolean Authenticate to the backend.
checkGlobalError ( ) : mixed Return any global errors that occured during initial connection.
commandsHeader ( ) Send protocol commands header.
contentTypeHeader ( $content_type = null ) Send the content type header.
getCollectionsObject ( ) : Horde_ActiveSync_Collections Return a collections singleton.
getGetVars ( ) : array Return the GET variables passed from the device, decoding from base64 if needed.
getImporter ( ) : Horde_ActiveSync_Connector_Importer Return an Importer object.
getMIMETruncSize ( integer $truncation ) : integer | boolean Return the number of bytes corresponding to the requested trunction constant. This applies to MIMETRUNCATION only.
getPolicyKey ( ) : integer Obtain the policy key header from the request.
getProtocolVersion ( ) : string Obtain the ActiveSync protocol version requested by the client headers.
getSupportedCommands ( ) : string Return the supported commands in a comma delimited string suitable for sending as the MS-ASProtocolCommands header.
getSupportedVersions ( ) : string Return supported versions in a comma delimited string suitable for sending as the MS-ASProtocolVersions header.
getSyncCache ( ) : Horde_ActiveSync_SyncCache Return a new, fully configured SyncCache.
getTruncSize ( integer $truncation ) : integer | boolean Return the number of bytes corresponding to the requested trunction constant.
handleRequest ( string $cmd, string $devId ) : string | boolean The heart of the server. Dispatch a request to the appropriate request handler.
messageFactory ( string $message ) : Horde_ActiveSync_Message_Base Factory method for creating Horde_ActiveSync_Message objects.
provisionHeader ( ) Send provision header
provisioningRequired ( ) Send the headers indicating that provisioning is required.
setLogger ( Horde_ActiveSync_Interface_LoggerFactory $logger ) : void Setter for the logger
setProvisioning ( $provision ) Setter for provisioning support
setRootCertificatePath ( string $path ) Set the local path to the root certificate bundle.
setSupportedVersion ( float $version ) Allow to force the highest version to support.
versionHeader ( ) Send the protocol versions header.

Méthodes protégées

Méthode Description
_doOptionsRequest ( ) Send the OPTIONS request response headers.
_handleDevice ( string $devId ) : boolean Handle device checks. Takes into account permissions and restrictions via various callback methods.
_setLogger ( array $options )

Method Details

__construct() public méthode

Const'r
public __construct ( Horde_ActiveSync_Driver_Base $driver, Horde_ActiveSync_Wbxml_Decoder $decoder, Horde_ActiveSync_Wbxml_Encoder $encoder, Horde_ActiveSync_State_Base $state, Horde_Controller_Request_Http $request ) : Horde_ActiveSync
$driver Horde_ActiveSync_Driver_Base The backend driver.
$decoder Horde_ActiveSync_Wbxml_Decoder The Wbxml decoder.
$encoder Horde_ActiveSync_Wbxml_Encoder The Wbxml encoder.
$state Horde_ActiveSync_State_Base The state driver.
$request Horde_Controller_Request_Http The HTTP request object.
Résultat Horde_ActiveSync The ActiveSync server object.

__get() public méthode

Getter
public __get ( string $property ) : mixed
$property string The property to return.
Résultat mixed The value of the requested property.

_doOptionsRequest() protected méthode

Send the OPTIONS request response headers.
protected _doOptionsRequest ( )

_handleDevice() protected méthode

Handle device checks. Takes into account permissions and restrictions via various callback methods.
protected _handleDevice ( string $devId ) : boolean
$devId string The client provided device id.
Résultat boolean If EAS version is > 12.1 returns false on any type of failure in allowing the device to connect. Sets appropriate internal variables to indicate the type of error to return to the client. Failure on EAS version < 12.1 results in throwing exceptions. Otherwise, return true.

_setLogger() protected méthode

protected _setLogger ( array $options )
$options array

activeSyncHeader() public méthode

Send the MS_Server-ActiveSync header.
public activeSyncHeader ( )

authenticate() public méthode

Authenticate to the backend.
public authenticate ( Horde_ActiveSync_Credentials $credentials ) : boolean
$credentials Horde_ActiveSync_Credentials The credentials object.
Résultat boolean True on successful authentication to the backend.

checkGlobalError() public méthode

Return any global errors that occured during initial connection.
Since: 2.4.0
public checkGlobalError ( ) : mixed
Résultat mixed A Horde_ActiveSync_Status:: constant of boolean false if no errors.

commandsHeader() public méthode

Send protocol commands header.
public commandsHeader ( )

contentTypeHeader() public méthode

Send the content type header.
public contentTypeHeader ( $content_type = null )

getCollectionsObject() public méthode

Return a collections singleton.
Since: 2.4.0
public getCollectionsObject ( ) : Horde_ActiveSync_Collections
Résultat Horde_ActiveSync_Collections

getGetVars() public méthode

Return the GET variables passed from the device, decoding from base64 if needed.
public getGetVars ( ) : array
Résultat array A hash of get variables => values.

getImporter() public méthode

Return an Importer object.
Since: 2.4.0
public getImporter ( ) : Horde_ActiveSync_Connector_Importer
Résultat Horde_ActiveSync_Connector_Importer

getMIMETruncSize() public static méthode

Return the number of bytes corresponding to the requested trunction constant. This applies to MIMETRUNCATION only.
Since: 2.20.0
public static getMIMETruncSize ( integer $truncation ) : integer | boolean
$truncation integer The constant.
Résultat integer | boolean Either the size, in bytes, to truncate or falso if no truncation.

getPolicyKey() public méthode

Obtain the policy key header from the request.
public getPolicyKey ( ) : integer
Résultat integer The policy key or '0' if not set.

getProtocolVersion() public méthode

Obtain the ActiveSync protocol version requested by the client headers.
public getProtocolVersion ( ) : string
Résultat string The EAS version requested by the client.

getSupportedCommands() public méthode

Return the supported commands in a comma delimited string suitable for sending as the MS-ASProtocolCommands header.
public getSupportedCommands ( ) : string
Résultat string

getSupportedVersions() public méthode

Return supported versions in a comma delimited string suitable for sending as the MS-ASProtocolVersions header.
public getSupportedVersions ( ) : string
Résultat string

getSyncCache() public méthode

Return a new, fully configured SyncCache.
Since: 2.4.0
public getSyncCache ( ) : Horde_ActiveSync_SyncCache
Résultat Horde_ActiveSync_SyncCache

getTruncSize() public méthode

Return the number of bytes corresponding to the requested trunction constant.
public getTruncSize ( integer $truncation ) : integer | boolean
$truncation integer The constant.
Résultat integer | boolean Either the size, in bytes, to truncate or falso if no truncation.

handleRequest() public méthode

The heart of the server. Dispatch a request to the appropriate request handler.
public handleRequest ( string $cmd, string $devId ) : string | boolean
$cmd string The command we are requesting.
$devId string The device id making the request. @deprecated
Résultat string | boolean false if failed, true if succeeded and response content is wbxml, otherwise the content-type string to send in the response.

messageFactory() public static méthode

Factory method for creating Horde_ActiveSync_Message objects.
Since: 2.4.0
public static messageFactory ( string $message ) : Horde_ActiveSync_Message_Base
$message string The message type.
Résultat Horde_ActiveSync_Message_Base The concrete message object.

provisionHeader() public méthode

Send provision header
public provisionHeader ( )

provisioningRequired() public méthode

Send the headers indicating that provisioning is required.

setLogger() public méthode

Setter for the logger
public setLogger ( Horde_ActiveSync_Interface_LoggerFactory $logger ) : void
$logger Horde_ActiveSync_Interface_LoggerFactory The logger object.
Résultat void

setProvisioning() public méthode

Setter for provisioning support
public setProvisioning ( $provision )

setRootCertificatePath() public méthode

Set the local path to the root certificate bundle.
public setRootCertificatePath ( string $path )
$path string The local path to the bundle.

setSupportedVersion() public méthode

Allow to force the highest version to support.
public setSupportedVersion ( float $version )
$version float The highest version

versionHeader() public méthode

Send the protocol versions header.
public versionHeader ( )

Property Details

$_certPath protected_oe property

Path to root certificate bundle
protected string $_certPath
Résultat string

$_collectionsObj protected_oe property

The singleton collections handler.
protected Horde_ActiveSync_Collections $_collectionsObj
Résultat Horde_ActiveSync_Collections

$_compression protected_oe property

Support gzip compression of certain data parts?
protected bool $_compression
Résultat boolean

$_decoder protected_oe property

Wbxml decoder
protected Horde_ActiveSync_Wbxml_Decoder $_decoder
Résultat Horde_ActiveSync_Wbxml_Decoder

$_device protected_oe static_oe property

protected static Horde_ActiveSync_Device $_device
Résultat Horde_ActiveSync_Device

$_encoder protected_oe property

Wbxml encoder
protected Horde_ActiveSync_Wbxml_Encoder $_encoder
Résultat Horde_ActiveSync_Wbxml_Encoder

$_get protected_oe property

Local cache of Get variables/decoded base64 uri
protected array $_get
Résultat array

$_globalError protected_oe property

Global error flag.
protected bool $_globalError
Résultat boolean

$_logger protected_oe static_oe property

The logger for this class.
protected static Horde_Log_Logger $_logger
Résultat Horde_Log_Logger

$_loggerFactory protected_oe property

Logger
protected Horde_ActiveSync_Interface_LoggerFactory $_loggerFactory
Résultat Horde_ActiveSync_Interface_LoggerFactory

$_maxVersion protected_oe property

Highest version to support.
protected float $_maxVersion
Résultat float

$_multipart protected_oe property

Multipart support?
protected bool $_multipart
Résultat boolean

$_needMsRp protected_oe property

Flag to indicate we need to update the device version.
protected bool $_needMsRp
Résultat boolean

$_procid protected_oe property

Process id (used in logging).
protected int $_procid
Résultat integer

$_provisioning protected_oe property

Provisioning support
protected string $_provisioning
Résultat string

$_supportedVersions protected_oe static_oe property

Supported EAS versions.
protected static array $_supportedVersions
Résultat array

$_version protected_oe static_oe property

The actual version we are supporting.
protected static float $_version
Résultat float