PHP Class Horde_ActiveSync_Message_Base, horde

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

Méthodes publiques

Свойство Type Description
$commandType string @since 2.31.0
$flags Horde_ActiveSync::FLAG_ Message flags

Protected Properties

Свойство Type Description
$_device Horde_ActiveSync_Device The device object
$_exists array Existence cache, used for working with ghosted properties.
$_logger Horde_Log_Logger Logger
$_mapping array Holds the mapping for object properties
$_properties array Holds property values
$_streamFilters array Cache of current stream filters.
$_supported array An array describing the non-ghosted elements this message supports.
$_version float The version of EAS we are to support.

Méthodes publiques

Méthode Description
__call ( mixed $method, array $arg ) : mixed Magic caller method.
__construct ( array $options = [] ) : Horde_ActiveSync_Message_Base Const'r
__destruct ( )
__get ( string $property ) : mixed Accessor
__isset ( string $property ) : boolean. Magic method.
__set ( string $property, mixed $value ) Setter
decodeStream ( Horde_ActiveSync_Wbxml_Decoder &$decoder ) Recursively decodes the WBXML from input stream. This means that if this message contains complex types (like Appointment.Recuurence for example) the sub-objects are auto-instantiated and decoded as well. Places the decoded objects in the local properties array.
encodeStream ( Horde_ActiveSync_Wbxml_Encoder &$encoder ) Encodes this object (and any sub-objects) as wbxml to the output stream.
getProtocolVersion ( ) : float Return the EAS version this object supports.
getSupported ( ) : array Get the list of non-ghosted properties for this message.
isEmpty ( ) : boolean Returns whether or not this message actually contains any data to send.
isGhosted ( string $property ) : boolean Determines if the property specified has been ghosted by the client.
propertyExists ( string $property ) : boolean Check the existence of a property in this message.
setSupported ( array $fields ) Set the list of non-ghosted fields for this message.

Méthodes protégées

Méthode Description
_checkEncoding ( mixed $data, string $tag ) : mixed Checks if the data needs to be encoded like e.g., when outputing binary data in-line during ITEMOPERATIONS requests. Concrete classes should override this if needed.
_checkSendEmpty ( string $tag ) : boolean Checks to see if we should send an empty value.
_formatDate ( Horde_Date $dt, integer $type ) : string Oh yeah. This is beautiful. Exchange outputs date fields differently in calendar items and emails. We could just always send one or the other, but unfortunately nokia's 'Mail for exchange' depends on this quirk.
_getAttribute ( string $name, stting $default = null ) : mixed Helper method to allow default values for unset properties.
_parseDate ( string $ts ) : Horde_Date | boolean Get a Horde_Date from a timestamp, ensuring it's in the correct format.
_preEncodeValidation ( ) : boolean Give concrete classes the chance to enforce rules before encoding messages to send to the client.
_validateDecodedValues ( ) : boolean Give concrete classes the chance to enforce rules.

Private Methods

Méthode Description
_hex2bin ( string $data ) : string Function which converts a hex entryid to a binary entryid.

Method Details

__call() public méthode

Magic caller method.
public __call ( mixed $method, array $arg ) : mixed
$method mixed The method to call.
$arg array Method arguments.
Résultat mixed

__construct() public méthode

Const'r
public __construct ( array $options = [] ) : Horde_ActiveSync_Message_Base
$options array Configuration options for the message: - logger: (Horde_Log_Logger) A logger instance DEFAULT: none (No logging). - protocolversion: (float) The version of EAS to support. DEFAULT: Horde_ActiveSync::VERSION_TWOFIVE (2.5) - device: (Horde_ActiveSync_Device) The device object. @since 2.9.2
Résultat Horde_ActiveSync_Message_Base

__destruct() public méthode

public __destruct ( )

__get() public méthode

Accessor
public __get ( string $property ) : mixed
$property string Property to get.
Résultat mixed The value of the requested property.

__isset() public méthode

Magic method.
public __isset ( string $property ) : boolean.
$property string The property name to check.
Résultat boolean.

__set() public méthode

Setter
public __set ( string $property, mixed $value )
$property string The property to set.
$value mixed The value to set it to.

_checkEncoding() protected méthode

Checks if the data needs to be encoded like e.g., when outputing binary data in-line during ITEMOPERATIONS requests. Concrete classes should override this if needed.
protected _checkEncoding ( mixed $data, string $tag ) : mixed
$data mixed The data to check. A string or stream resource.
$tag string The tag we are outputing.
Résultat mixed The encoded data. A string or stream resource with a filter attached.

_checkSendEmpty() protected méthode

Checks to see if we should send an empty value.
protected _checkSendEmpty ( string $tag ) : boolean
$tag string The tag name
Résultat boolean

_formatDate() protected méthode

So we have to send a different date type depending on where it's used. Used when encoding a date value to send to the client.
protected _formatDate ( Horde_Date $dt, integer $type ) : string
$dt Horde_Date The Horde_Date object to format (should normally be in local tz).
$type integer The type to format as: One of TYPE_DATE or TYPE_DATE_DASHES, TYPE_DATE_LOCAL
Résultat string The formatted date

_getAttribute() protected méthode

Helper method to allow default values for unset properties.
protected _getAttribute ( string $name, stting $default = null ) : mixed
$name string The property name
$default stting The default value to return if $property is empty
Résultat mixed

_parseDate() protected méthode

Used when decoding an incoming date value from the client.
protected _parseDate ( string $ts ) : Horde_Date | boolean
$ts string The timestamp
Résultat Horde_Date | boolean The Horde_Date or false if unable to decode.

_preEncodeValidation() protected méthode

Give concrete classes the chance to enforce rules before encoding messages to send to the client.
Since: 2.31.0
protected _preEncodeValidation ( ) : boolean
Résultat boolean True if values were valid (or could be made valid). False if values are unable to be validated.

_validateDecodedValues() protected méthode

Give concrete classes the chance to enforce rules.
Since: 2.31.0
protected _validateDecodedValues ( ) : boolean
Résultat boolean True on success, otherwise false.

decodeStream() public méthode

Recursively decodes the WBXML from input stream. This means that if this message contains complex types (like Appointment.Recuurence for example) the sub-objects are auto-instantiated and decoded as well. Places the decoded objects in the local properties array.
public decodeStream ( Horde_ActiveSync_Wbxml_Decoder &$decoder )
$decoder Horde_ActiveSync_Wbxml_Decoder

encodeStream() public méthode

Output is ordered according to $_mapping
public encodeStream ( Horde_ActiveSync_Wbxml_Encoder &$encoder )
$encoder Horde_ActiveSync_Wbxml_Encoder The wbxml stream encoder

getProtocolVersion() public méthode

Return the EAS version this object supports.
public getProtocolVersion ( ) : float
Résultat float A Horde_ActiveSync::VERSION_* constant.

getSupported() public méthode

Get the list of non-ghosted properties for this message.
public getSupported ( ) : array
Résultat array The array of non-ghosted properties

isEmpty() public méthode

Returns whether or not this message actually contains any data to send.
Since: 2.34.0
public isEmpty ( ) : boolean
Résultat boolean True if message is empty, otherwise false.

isGhosted() public méthode

A property is ghosted if it is NOT listed in the SUPPORTED list sent by the client AND is NOT present in the request data.
public isGhosted ( string $property ) : boolean
$property string The property to check
Résultat boolean

propertyExists() public méthode

Check the existence of a property in this message.
public propertyExists ( string $property ) : boolean
$property string The property name
Résultat boolean

setSupported() public méthode

Set the list of non-ghosted fields for this message.
public setSupported ( array $fields )
$fields array The array of fields, keyed by the fully qualified property name i.e., POOMCONTACTS:Anniversary. To signify an empty SUPPORTED container $fields should contain a single element equal to Horde_ActiveSync::ALL_GHOSTED.

Property Details

$_device protected_oe property

The device object
Since: 2.9.2
protected Horde_ActiveSync_Device $_device
Résultat Horde_ActiveSync_Device

$_exists protected_oe property

Existence cache, used for working with ghosted properties.
protected array $_exists
Résultat array

$_logger protected_oe property

Logger
protected Horde_Log_Logger $_logger
Résultat Horde_Log_Logger

$_mapping protected_oe property

Holds the mapping for object properties
protected array $_mapping
Résultat array

$_properties protected_oe property

Holds property values
protected array $_properties
Résultat array

$_streamFilters protected_oe property

Cache of current stream filters.
protected array $_streamFilters
Résultat array

$_supported protected_oe property

An array describing the non-ghosted elements this message supports.
protected array $_supported
Résultat array

$_version protected_oe property

The version of EAS we are to support.
protected float $_version
Résultat float

$commandType public_oe property

@since 2.31.0
public string $commandType
Résultat string

$flags public_oe property

Message flags
public Horde_ActiveSync::FLAG_ $flags
Résultat Horde_ActiveSync::FLAG_