PHP Класс Horde_ActiveSync_Message_Base, horde

Автор: Michael J Rubinsky ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$commandType string @since 2.31.0
$flags Horde_ActiveSync::FLAG_ Message flags

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

Приватные методы

Метод Описание
_hex2bin ( string $data ) : string Function which converts a hex entryid to a binary entryid.

Описание методов

__call() публичный Метод

Magic caller method.
public __call ( mixed $method, array $arg ) : mixed
$method mixed The method to call.
$arg array Method arguments.
Результат mixed

__construct() публичный Метод

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
Результат Horde_ActiveSync_Message_Base

__destruct() публичный Метод

public __destruct ( )

__get() публичный Метод

Accessor
public __get ( string $property ) : mixed
$property string Property to get.
Результат mixed The value of the requested property.

__isset() публичный Метод

Magic method.
public __isset ( string $property ) : boolean.
$property string The property name to check.
Результат boolean.

__set() публичный Метод

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

_checkEncoding() защищенный Метод

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.
Результат mixed The encoded data. A string or stream resource with a filter attached.

_checkSendEmpty() защищенный Метод

Checks to see if we should send an empty value.
protected _checkSendEmpty ( string $tag ) : boolean
$tag string The tag name
Результат boolean

_formatDate() защищенный Метод

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
Результат string The formatted date

_getAttribute() защищенный Метод

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
Результат mixed

_parseDate() защищенный Метод

Used when decoding an incoming date value from the client.
protected _parseDate ( string $ts ) : Horde_Date | boolean
$ts string The timestamp
Результат Horde_Date | boolean The Horde_Date or false if unable to decode.

_preEncodeValidation() защищенный Метод

Give concrete classes the chance to enforce rules before encoding messages to send to the client.
С версии: 2.31.0
protected _preEncodeValidation ( ) : boolean
Результат boolean True if values were valid (or could be made valid). False if values are unable to be validated.

_validateDecodedValues() защищенный Метод

Give concrete classes the chance to enforce rules.
С версии: 2.31.0
protected _validateDecodedValues ( ) : boolean
Результат boolean True on success, otherwise false.

decodeStream() публичный Метод

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() публичный Метод

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

getProtocolVersion() публичный Метод

Return the EAS version this object supports.
public getProtocolVersion ( ) : float
Результат float A Horde_ActiveSync::VERSION_* constant.

getSupported() публичный Метод

Get the list of non-ghosted properties for this message.
public getSupported ( ) : array
Результат array The array of non-ghosted properties

isEmpty() публичный Метод

Returns whether or not this message actually contains any data to send.
С версии: 2.34.0
public isEmpty ( ) : boolean
Результат boolean True if message is empty, otherwise false.

isGhosted() публичный Метод

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
Результат boolean

propertyExists() публичный Метод

Check the existence of a property in this message.
public propertyExists ( string $property ) : boolean
$property string The property name
Результат boolean

setSupported() публичный Метод

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.

Описание свойств

$_device защищенное свойство

The device object
С версии: 2.9.2
protected Horde_ActiveSync_Device $_device
Результат Horde_ActiveSync_Device

$_exists защищенное свойство

Existence cache, used for working with ghosted properties.
protected array $_exists
Результат array

$_logger защищенное свойство

Logger
protected Horde_Log_Logger $_logger
Результат Horde_Log_Logger

$_mapping защищенное свойство

Holds the mapping for object properties
protected array $_mapping
Результат array

$_properties защищенное свойство

Holds property values
protected array $_properties
Результат array

$_streamFilters защищенное свойство

Cache of current stream filters.
protected array $_streamFilters
Результат array

$_supported защищенное свойство

An array describing the non-ghosted elements this message supports.
protected array $_supported
Результат array

$_version защищенное свойство

The version of EAS we are to support.
protected float $_version
Результат float

$commandType публичное свойство

@since 2.31.0
public string $commandType
Результат string

$flags публичное свойство

Message flags
public Horde_ActiveSync::FLAG_ $flags
Результат Horde_ActiveSync::FLAG_