\Horde_ActiveSync_Message_Task

Horde_ActiveSync_Message_Task::

Summary

Methods
Properties
Constants
__construct()
__destruct()
getProtocolVersion()
propertyExists()
__get()
__set()
__call()
__isset()
setSupported()
getSupported()
isGhosted()
decodeStream()
encodeStream()
isEmpty()
setImportance()
getImportance()
setReminder()
getReminder()
setRecurrence()
getRecurrence()
getClass()
$flags
$commandType
$complete
$datecompleted
$utcduedate
$importance
$recurrence
$sensitivity
$utcstartdate
$subject
$categories
$body
$bodytruncated
$airsyncbasebody
KEY_ATTRIBUTE
KEY_VALUES
KEY_TYPE
KEY_PROPERTY
TYPE_DATE
TYPE_HEX
TYPE_DATE_DASHES
TYPE_MAPI_STREAM
TYPE_MAPI_GOID
TYPE_DATE_LOCAL
PROPERTY_NO_CONTAINER
POOMTASKS_BODY
POOMTASKS_BODYSIZE
POOMTASKS_BODYTRUNCATED
POOMTASKS_CATEGORIES
POOMTASKS_CATEGORY
POOMTASKS_COMPLETE
POOMTASKS_DATECOMPLETED
POOMTASKS_DUEDATE
POOMTASKS_UTCDUEDATE
POOMTASKS_IMPORTANCE
POOMTASKS_RECURRENCE
POOMTASKS_TYPE
POOMTASKS_START
POOMTASKS_UNTIL
POOMTASKS_OCCURRENCES
POOMTASKS_INTERVAL
POOMTASKS_DAYOFWEEK
POOMTASKS_DAYOFMONTH
POOMTASKS_WEEKOFMONTH
POOMTASKS_MONTHOFYEAR
POOMTASKS_REGENERATE
POOMTASKS_DEADOCCUR
POOMTASKS_REMINDERSET
POOMTASKS_REMINDERTIME
POOMTASKS_SENSITIVITY
POOMTASKS_STARTDATE
POOMTASKS_UTCSTARTDATE
POOMTASKS_SUBJECT
POOMTASKS_RTF
POOMTASKS_ORDINALDATE
POOMTASKS_SUBORDINALDATE
POOMTASKS_CALENDARTYPE
POOMTASKS_ISLEAPMONTH
POOMTASKS_FIRSTDAYOFWEEK
TASK_COMPLETE_TRUE
TASK_COMPLETE_FALSE
IMPORTANCE_LOW
IMPORTANCE_NORMAL
IMPORTANCE_HIGH
REMINDER_SET_FALSE
REMINDER_SET_TRUE
_validateDecodedValues()
_preEncodeValidation()
_checkEncoding()
_checkSendEmpty()
_getAttribute()
_formatDate()
_parseDate()
$_mapping
$_properties
$_logger
$_supported
$_exists
$_version
$_device
$_streamFilters
$_dayOfWeekMap
N/A
_hex2bin()
No private properties found
N/A

Constants

KEY_ATTRIBUTE

KEY_ATTRIBUTE

KEY_VALUES

KEY_VALUES

KEY_TYPE

KEY_TYPE

KEY_PROPERTY

KEY_PROPERTY

TYPE_DATE

TYPE_DATE

TYPE_HEX

TYPE_HEX

TYPE_DATE_DASHES

TYPE_DATE_DASHES

TYPE_MAPI_STREAM

TYPE_MAPI_STREAM

TYPE_MAPI_GOID

TYPE_MAPI_GOID

TYPE_DATE_LOCAL

TYPE_DATE_LOCAL

PROPERTY_NO_CONTAINER

PROPERTY_NO_CONTAINER

POOMTASKS_BODY

POOMTASKS_BODY

POOMTASKS_BODYSIZE

POOMTASKS_BODYSIZE

POOMTASKS_BODYTRUNCATED

POOMTASKS_BODYTRUNCATED

POOMTASKS_CATEGORIES

POOMTASKS_CATEGORIES

POOMTASKS_CATEGORY

POOMTASKS_CATEGORY

POOMTASKS_COMPLETE

POOMTASKS_COMPLETE

POOMTASKS_DATECOMPLETED

POOMTASKS_DATECOMPLETED

POOMTASKS_DUEDATE

POOMTASKS_DUEDATE

POOMTASKS_UTCDUEDATE

POOMTASKS_UTCDUEDATE

POOMTASKS_IMPORTANCE

POOMTASKS_IMPORTANCE

POOMTASKS_RECURRENCE

POOMTASKS_RECURRENCE

POOMTASKS_TYPE

POOMTASKS_TYPE

POOMTASKS_START

POOMTASKS_START

POOMTASKS_UNTIL

POOMTASKS_UNTIL

POOMTASKS_OCCURRENCES

POOMTASKS_OCCURRENCES

POOMTASKS_INTERVAL

POOMTASKS_INTERVAL

POOMTASKS_DAYOFWEEK

POOMTASKS_DAYOFWEEK

POOMTASKS_DAYOFMONTH

POOMTASKS_DAYOFMONTH

POOMTASKS_WEEKOFMONTH

POOMTASKS_WEEKOFMONTH

POOMTASKS_MONTHOFYEAR

POOMTASKS_MONTHOFYEAR

POOMTASKS_REGENERATE

POOMTASKS_REGENERATE

POOMTASKS_DEADOCCUR

POOMTASKS_DEADOCCUR

POOMTASKS_REMINDERSET

POOMTASKS_REMINDERSET

POOMTASKS_REMINDERTIME

POOMTASKS_REMINDERTIME

POOMTASKS_SENSITIVITY

POOMTASKS_SENSITIVITY

POOMTASKS_STARTDATE

POOMTASKS_STARTDATE

POOMTASKS_UTCSTARTDATE

POOMTASKS_UTCSTARTDATE

POOMTASKS_SUBJECT

POOMTASKS_SUBJECT

POOMTASKS_RTF

POOMTASKS_RTF

POOMTASKS_ORDINALDATE

POOMTASKS_ORDINALDATE

POOMTASKS_SUBORDINALDATE

POOMTASKS_SUBORDINALDATE

POOMTASKS_CALENDARTYPE

POOMTASKS_CALENDARTYPE

POOMTASKS_ISLEAPMONTH

POOMTASKS_ISLEAPMONTH

POOMTASKS_FIRSTDAYOFWEEK

POOMTASKS_FIRSTDAYOFWEEK

TASK_COMPLETE_TRUE

TASK_COMPLETE_TRUE

TASK_COMPLETE_FALSE

TASK_COMPLETE_FALSE

IMPORTANCE_LOW

IMPORTANCE_LOW

IMPORTANCE_NORMAL

IMPORTANCE_NORMAL

IMPORTANCE_HIGH

IMPORTANCE_HIGH

REMINDER_SET_FALSE

REMINDER_SET_FALSE

REMINDER_SET_TRUE

REMINDER_SET_TRUE

Properties

$flags

$flags : \Horde_ActiveSync::FLAG_*

Message flags

Type

\Horde_ActiveSync::FLAG_* — constant

$commandType

$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.

@since 2.31.0

Type

string

$complete

$complete : boolean

Completion flag

Type

boolean

$datecompleted

$datecompleted : \Horde_Date

The date the task was completed, in UTC.

Type

\Horde_Date

$utcduedate

$utcduedate : \Horde_Date

The date this task is due, in UTC.

Type

\Horde_Date

$importance

$importance : integer

The importance flag.

Type

integer

$recurrence

$recurrence : \Horde_ActiveSync_Message_TaskRecurrence

The recurrence object.

Type

\Horde_ActiveSync_Message_TaskRecurrence

$sensitivity

$sensitivity : integer

The sensitivity flag.

Type

integer

$utcstartdate

$utcstartdate : \Horde_Date

The date this task starts, in UTC.

Type

\Horde_Date

$subject

$subject : string

The task subject.

Type

string

$categories

$categories : array

An array of categories.

Type

array

$body

$body : string

The task body (EAS Version < 12.0)

Type

string

$bodytruncated

$bodytruncated : boolean

Truncation flag (EAS Version < 12.0)

Type

boolean

$airsyncbasebody

$airsyncbasebody : \Horde_ActiveSync_Message_AirSyncBaseBody

The task body (EAS Version >= 12.0)

Type

\Horde_ActiveSync_Message_AirSyncBaseBody

$_mapping

$_mapping : array

Property mapping

Type

array

$_properties

$_properties : array

Property values.

Type

array

$_logger

$_logger : \Horde_Log_Logger

Logger

Type

\Horde_Log_Logger

$_supported

$_supported : array

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

Type

array

$_exists

$_exists : array

Existence cache, used for working with ghosted properties.

Type

array

$_version

$_version : float

The version of EAS we are to support.

Type

float

$_streamFilters

$_streamFilters : array

Cache of current stream filters.

Type

array

$_dayOfWeekMap

$_dayOfWeekMap : array

DOW mapping for DATE to MASK

Type

array

Methods

__construct()

__construct(array  $options = array()) : \Horde_ActiveSync_Message_Base

Const'r

Parameters

array $options

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

Returns

\Horde_ActiveSync_Message_Base

__destruct()

__destruct() 

getProtocolVersion()

getProtocolVersion() : float

Return the EAS version this object supports.

Returns

float —

A HordeActiveSync::VERSION* constant.

propertyExists()

propertyExists(string  $property) : boolean

Check the existence of a property in this message.

Parameters

string $property

The property name

Returns

boolean

__get()

__get(string  $property) : mixed

Accessor

Parameters

string $property

Property to get.

Returns

mixed —

The value of the requested property.

__set()

__set(string  $property, mixed  $value) 

Setter

Parameters

string $property

The property to set.

mixed $value

The value to set it to.

Throws

\InvalidArgumentException

__call()

__call(mixed  $method, array  $arg) : mixed

Magic caller method.

Parameters

mixed $method

The method to call.

array $arg

Method arguments.

Returns

mixed

__isset()

__isset(string  $property) : \boolean.

Magic method.

Parameters

string $property

The property name to check.

Returns

\boolean.

setSupported()

setSupported(array  $fields) 

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

Parameters

array $fields

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.

getSupported()

getSupported() : array

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

Returns

array —

The array of non-ghosted properties

isGhosted()

isGhosted(string  $property) : boolean

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

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

string $property

The property to check

Returns

boolean

decodeStream()

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.

Parameters

\Horde_ActiveSync_Wbxml_Decoder $decoder

Throws

\Horde_ActiveSync_Exception

encodeStream()

encodeStream(\Horde_ActiveSync_Wbxml_Encoder  $encoder) 

Encodes this object (and any sub-objects) as wbxml to the output stream.

Output is ordered according to $_mapping

Parameters

\Horde_ActiveSync_Wbxml_Encoder $encoder

The wbxml stream encoder

Throws

\Horde_ActiveSync_Exception

isEmpty()

isEmpty() : boolean

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

Returns

boolean —

True if message is empty, otherwise false.

setImportance()

setImportance(integer  $importance) 

Set the importance

Parameters

integer $importance

A IMPORTANCE_* flag

getImportance()

getImportance() : integer

Get the task importance level

Returns

integer —

A IMPORTANCE_* constant

setReminder()

setReminder(\Horde_Date  $datetime) 

Set the reminder datetime

Parameters

\Horde_Date $datetime

The time to trigger the alarm in local tz.

getReminder()

getReminder() : \Horde_Date

Get the reminder time.

Returns

\Horde_Date —

in local tz

setRecurrence()

setRecurrence(\Horde_Date_Recurrence  $recurrence) 

Set recurrence information for this task

Parameters

\Horde_Date_Recurrence $recurrence

getRecurrence()

getRecurrence() : \Horde_Date_Recurrence

Obtain a recurrence object. Note this returns a Horde_Date_Recurrence object, not Horde_ActiveSync_Message_Recurrence.

Returns

\Horde_Date_Recurrence

getClass()

getClass() : string

Return this object's folder class

Returns

string

_validateDecodedValues()

_validateDecodedValues() : boolean

Give concrete classes the chance to enforce rules.

Returns

boolean —

True on success, otherwise false.

_preEncodeValidation()

_preEncodeValidation() : boolean

Give concrete classes the chance to enforce rules before encoding messages to send to the client.

Returns

boolean —

True if values were valid (or could be made valid). False if values are unable to be validated.

_checkEncoding()

_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.

Parameters

mixed $data

The data to check. A string or stream resource.

string $tag

The tag we are outputing.

Returns

mixed —

The encoded data. A string or stream resource with a filter attached.

_checkSendEmpty()

_checkSendEmpty(string  $tag) : boolean

Check if a field should be sent to the device even if it is empty.

Parameters

string $tag

The field tag.

Returns

boolean

_getAttribute()

_getAttribute(string  $name, \stting  $default = null) : mixed

Helper method to allow default values for unset properties.

Parameters

string $name

The property name

\stting $default

The default value to return if $property is empty

Returns

mixed

_formatDate()

_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.

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

\Horde_Date $dt

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

integer $type

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

Throws

\InvalidArgumentException

Returns

string —

The formatted date

_parseDate()

_parseDate(string  $ts) : \Horde_Date|boolean

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

Used when decoding an incoming date value from the client.

Parameters

string $ts

The timestamp

Returns

\Horde_Date|boolean —

The Horde_Date or false if unable to decode.

_hex2bin()

_hex2bin(string  $data) : string

Function which converts a hex entryid to a binary entryid.

Parameters

string $data

The hexadecimal string

Returns

string —

The binary data