Documentation

Horde_ActiveSync_Message_TaskRecurrence extends Horde_ActiveSync_Message_Base
in package

Horde_ActiveSync_Message_TaskRecurrence::

Portions of this class were ported from the Z-Push project: File : wbxml.php Project : Z-Push Descr : WBXML mapping file

Created : 01.10.2007

� Zarafa Deutschland GmbH, www.zarafaserver.de This file is distributed under GPL-2.0. Consult LICENSE file for details

Tags
license

http://www.horde.org/licenses/gpl GPLv2

copyright

2012-2020 Horde LLC (http://www.horde.org)

author

Michael J Rubinsky mrubinsk@horde.org

Table of Contents

KEY_ATTRIBUTE  = 1
KEY_PROPERTY  = 4
KEY_TYPE  = 3
KEY_VALUES  = 2
PROPERTY_NO_CONTAINER  = 7
TYPE_DAILY  = 0
TYPE_DATE  = 1
TYPE_DATE_DASHES  = 3
TYPE_DATE_LOCAL  = 6
TYPE_HEX  = 2
TYPE_MAPI_GOID  = 5
TYPE_MAPI_STREAM  = 4
TYPE_MONTHLY  = 2
TYPE_MONTHLY_NTH  = 3
TYPE_WEEKLY  = 1
TYPE_YEARLY  = 5
TYPE_YEARLYNTH  = 6
$commandType  : string
Request type. One of: Horde_ActiveSync::SYNC_ADD, SYNC_MODIFY, SYNC_REMOVE, or SYNC_FETCH. Used internally for enforcing various protocol rules depending on request.
$dayofmonth  : int
$dayofweek  : int
$flags  : mixed
Message flags
$interval  : int
$monthofyear  : int
$occurrences  : string
$start  : Horde_Date
$type  : int
$until  : Horde_Date
$weekofmonth  : int
$_device  : Horde_ActiveSync_Device
The device object
$_exists  : array<string|int, mixed>
Existence cache, used for working with ghosted properties.
$_logger  : Horde_Log_Logger
Logger
$_mapping  : array<string|int, mixed>
Property mapping.
$_properties  : array<string|int, mixed>
Property values.
$_streamFilters  : array<string|int, mixed>
Cache of current stream filters.
$_supported  : array<string|int, mixed>
An array describing the non-ghosted elements this message supports.
$_version  : float
The version of EAS we are to support.
__call()  : mixed
Magic caller method.
__construct()  : Horde_ActiveSync_Message_Base
Const'r
__destruct()  : mixed
__get()  : mixed
Accessor
__isset()  : mixed
Magic method.
__set()  : mixed
Setter
decodeStream()  : mixed
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()  : mixed
Encodes this object (and any sub-objects) as wbxml to the output stream.
getProtocolVersion()  : float
Return the EAS version this object supports.
getSupported()  : array<string|int, mixed>
Get the list of non-ghosted properties for this message.
isEmpty()  : bool
Returns whether or not this message actually contains any data to send.
isGhosted()  : bool
Determines if the property specified has been ghosted by the client.
propertyExists()  : bool
Check the existence of a property in this message.
setSupported()  : mixed
Set the list of non-ghosted fields for this message.
_checkEncoding()  : 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()  : bool
Checks to see if we should send an empty value.
_formatDate()  : 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()  : mixed
Helper method to allow default values for unset properties.
_parseDate()  : Horde_Date|bool
Get a Horde_Date from a timestamp, ensuring it's in the correct format.
_preEncodeValidation()  : bool
Give concrete classes the chance to enforce rules before encoding messages to send to the client.
_validateDecodedValues()  : bool
Give concrete classes the chance to enforce rules.
_hex2bin()  : string
Function which converts a hex entryid to a binary entryid.

Constants

KEY_ATTRIBUTE

public mixed KEY_ATTRIBUTE = 1

KEY_PROPERTY

public mixed KEY_PROPERTY = 4

KEY_TYPE

public mixed KEY_TYPE = 3

KEY_VALUES

public mixed KEY_VALUES = 2

PROPERTY_NO_CONTAINER

public mixed PROPERTY_NO_CONTAINER = 7

TYPE_DATE

public mixed TYPE_DATE = 1

TYPE_DATE_DASHES

public mixed TYPE_DATE_DASHES = 3

TYPE_DATE_LOCAL

public mixed TYPE_DATE_LOCAL = 6

TYPE_HEX

public mixed TYPE_HEX = 2

TYPE_MAPI_GOID

public mixed TYPE_MAPI_GOID = 5

TYPE_MAPI_STREAM

public mixed TYPE_MAPI_STREAM = 4

Properties

$commandType

Request type. One of: Horde_ActiveSync::SYNC_ADD, SYNC_MODIFY, SYNC_REMOVE, or SYNC_FETCH. Used internally for enforcing various protocol rules depending on request.

public string $commandType

@since 2.31.0

$flags

Message flags

public mixed $flags = \false

Horde_ActiveSync::FLAG_* constant

$_exists

Existence cache, used for working with ghosted properties.

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

$_logger

Logger

protected Horde_Log_Logger $_logger

$_mapping

Property mapping.

protected array<string|int, mixed> $_mapping = array(\Horde_ActiveSync_Message_Task::POOMTASKS_REGENERATE => array(self::KEY_ATTRIBUTE => 'regenerate'), \Horde_ActiveSync_Message_Task::POOMTASKS_INTERVAL => array(self::KEY_ATTRIBUTE => 'interval'), \Horde_ActiveSync_Message_Task::POOMTASKS_START => array(self::KEY_ATTRIBUTE => 'start', self::KEY_TYPE => self::TYPE_DATE_DASHES), \Horde_ActiveSync_Message_Task::POOMTASKS_TYPE => array(self::KEY_ATTRIBUTE => 'type'), \Horde_ActiveSync_Message_Task::POOMTASKS_UNTIL => array(self::KEY_ATTRIBUTE => 'until', self::KEY_TYPE => self::TYPE_DATE_DASHES), \Horde_ActiveSync_Message_Task::POOMTASKS_OCCURRENCES => array(self::KEY_ATTRIBUTE => 'occurrences'), \Horde_ActiveSync_Message_Task::POOMTASKS_DAYOFWEEK => array(self::KEY_ATTRIBUTE => 'dayofweek'), \Horde_ActiveSync_Message_Task::POOMTASKS_DAYOFMONTH => array(self::KEY_ATTRIBUTE => 'dayofmonth'), \Horde_ActiveSync_Message_Task::POOMTASKS_WEEKOFMONTH => array(self::KEY_ATTRIBUTE => 'weekofmonth'), \Horde_ActiveSync_Message_Task::POOMTASKS_MONTHOFYEAR => array(self::KEY_ATTRIBUTE => 'monthofyear'), \Horde_ActiveSync_Message_Task::POOMTASKS_DEADOCCUR => array(self::KEY_ATTRIBUTE => 'deadoccur'), \Horde_ActiveSync_Message_Task::POOMTASKS_CALENDARTYPE => array(self::KEY_ATTRIBUTE => 'calendartype'), \Horde_ActiveSync_Message_Task::POOMTASKS_ISLEAPMONTH => array(self::KEY_ATTRIBUTE => 'isleapmonth'), \Horde_ActiveSync_Message_Task::POOMTASKS_FIRSTDAYOFWEEK => array(self::KEY_ATTRIBUTE => 'firstdayofweek'))

$_properties

Property values.

protected array<string|int, mixed> $_properties = array('type' => \false, 'start' => \false, 'until' => \false, 'occurrences' => \false, 'interval' => \false, 'dayofweek' => \false, 'dayofmonth' => \false, 'weekofmonth' => \false, 'monthofyear' => \false, 'regenerate' => \false, 'deadoccur' => \false, 'calendartype' => \false, 'isleapmonth' => \false, 'firstdayofweek' => \false)

$_streamFilters

Cache of current stream filters.

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

$_supported

An array describing the non-ghosted elements this message supports.

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

$_version

The version of EAS we are to support.

protected float $_version = \Horde_ActiveSync::VERSION_TWOFIVE

Methods

__call()

Magic caller method.

public __call(mixed $method, array<string|int, mixed> $arg) : mixed
Parameters
$method : mixed

The method to call.

$arg : array<string|int, mixed>

Method arguments.

Return values
mixed

__construct()

Const'r

public __construct([array<string|int, mixed> $options = array() ]) : Horde_ActiveSync_Message_Base
Parameters
$options : array<string|int, mixed> = 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
Return values
Horde_ActiveSync_Message_Base

__destruct()

public __destruct() : mixed
Return values
mixed

__get()

Accessor

public & __get(string $property) : mixed
Parameters
$property : string

Property to get.

Tags
todo:

Return boolean false if not set. Not BC to change it.

Return values
mixed

The value of the requested property.

__isset()

Magic method.

public __isset(string $property) : mixed
Parameters
$property : string

The property name to check.

Return values
mixed

__set()

Setter

public __set(string $property, mixed $value) : mixed
Parameters
$property : string

The property to set.

$value : mixed

The value to set it to.

Tags
throws
InvalidArgumentException
Return values
mixed

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) : mixed
Parameters
$decoder : Horde_ActiveSync_Wbxml_Decoder
Tags
throws
Horde_ActiveSync_Exception
Return values
mixed

getProtocolVersion()

Return the EAS version this object supports.

public getProtocolVersion() : float
Return values
float

A Horde_ActiveSync::VERSION_* constant.

getSupported()

Get the list of non-ghosted properties for this message.

public getSupported() : array<string|int, mixed>
Return values
array<string|int, mixed>

The array of non-ghosted properties

isEmpty()

Returns whether or not this message actually contains any data to send.

public isEmpty() : bool
Tags
since
2.34.0
Return values
bool

True if message is empty, otherwise false.

isGhosted()

Determines if the property specified has been ghosted by the client.

public isGhosted(string $property) : bool

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.

Parameters
$property : string

The property to check

Return values
bool

propertyExists()

Check the existence of a property in this message.

public propertyExists(string $property) : bool
Parameters
$property : string

The property name

Return values
bool

setSupported()

Set the list of non-ghosted fields for this message.

public setSupported(array<string|int, mixed> $fields) : mixed
Parameters
$fields : array<string|int, mixed>

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.

Return values
mixed

_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
Parameters
$data : mixed

The data to check. A string or stream resource.

$tag : string

The tag we are outputing.

Return values
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) : bool
Parameters
$tag : string

The tag name

Return values
bool

_formatDate()

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.

protected _formatDate(Horde_Date $dt, int $type) : string

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.

Parameters
$dt : Horde_Date

The Horde_Date object to format (should normally be in local tz).

$type : int

The type to format as: One of TYPE_DATE or TYPE_DATE_DASHES, TYPE_DATE_LOCAL

Tags
throws
InvalidArgumentException
Return values
string

The formatted date

_getAttribute()

Helper method to allow default values for unset properties.

protected _getAttribute(string $name[, stting $default = null ]) : mixed
Parameters
$name : string

The property name

$default : stting = null

The default value to return if $property is empty

Return values
mixed

_parseDate()

Get a Horde_Date from a timestamp, ensuring it's in the correct format.

protected _parseDate(string $ts) : Horde_Date|bool

Used when decoding an incoming date value from the client.

Parameters
$ts : string

The timestamp

Return values
Horde_Date|bool

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.

protected _preEncodeValidation() : bool
Tags
since
2.31.0
Return values
bool

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.

protected _validateDecodedValues() : bool
Tags
since
2.31.0
Return values
bool

True on success, otherwise false.

_hex2bin()

Function which converts a hex entryid to a binary entryid.

private static _hex2bin(string $data) : string
Parameters
$data : string

The hexadecimal string

Return values
string

The binary data

Search results