\Horde_ActiveSync_Message_Appointment

Horde_ActiveSync_Message_Appointment

Summary

Methods
Properties
Constants
__construct()
__destruct()
getProtocolVersion()
propertyExists()
__get()
__set()
__call()
__isset()
setSupported()
getSupported()
isGhosted()
decodeStream()
encodeStream()
isEmpty()
setTimezone()
getTimezone()
setDTStamp()
getDTStamp()
setDatetime()
getDatetime()
setSubject()
getSubject()
setUid()
getUid()
setServerUID()
getServerUID()
setOrganizer()
getOrganizer()
setLocation()
getLocation()
setRecurrence()
getRecurrence()
addException()
getExceptions()
setSensitivity()
getSensitivity()
setBusyStatus()
getBusyStatus()
setResponseType()
getResponseType()
setReminder()
getReminder()
setMeetingStatus()
getMeetingStatus()
addAttendee()
getAttendees()
setBody()
getBody()
addCategory()
getCategories()
addAttachment()
getClass()
$flags
$commandType
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
POOMCAL_TIMEZONE
POOMCAL_ALLDAYEVENT
POOMCAL_ATTENDEES
POOMCAL_ATTENDEE
POOMCAL_ATTENDEESTATUS
POOMCAL_ATTENDEETYPE
POOMCAL_EMAIL
POOMCAL_NAME
POOMCAL_BODY
POOMCAL_BODYTRUNCATED
POOMCAL_BUSYSTATUS
POOMCAL_CATEGORIES
POOMCAL_CATEGORY
POOMCAL_RTF
POOMCAL_DTSTAMP
POOMCAL_ENDTIME
POOMCAL_EXCEPTION
POOMCAL_EXCEPTIONS
POOMCAL_DELETED
POOMCAL_EXCEPTIONSTARTTIME
POOMCAL_LOCATION
POOMCAL_MEETINGSTATUS
POOMCAL_ORGANIZEREMAIL
POOMCAL_ORGANIZERNAME
POOMCAL_RECURRENCE
POOMCAL_TYPE
POOMCAL_UNTIL
POOMCAL_OCCURRENCES
POOMCAL_INTERVAL
POOMCAL_DAYOFWEEK
POOMCAL_DAYOFMONTH
POOMCAL_WEEKOFMONTH
POOMCAL_MONTHOFYEAR
POOMCAL_REMINDER
POOMCAL_SENSITIVITY
POOMCAL_SUBJECT
POOMCAL_STARTTIME
POOMCAL_UID
POOMCAL_DISALLOWNEWTIMEPROPOSAL
POOMCAL_RESPONSEREQUESTED
POOMCAL_APPOINTMENTREPLYTIME
POOMCAL_CALENDARTYPE
POOMCAL_ISLEAPMONTH
POOMCAL_RESPONSETYPE
POOMCAL_FIRSTDAYOFWEEK
POOMCAL_ONLINECONFLINK
POOMCAL_ONLINEEXTLINK
POOMCAL_CLIENTUID
SENSITIVITY_NORMAL
SENSITIVITY_PERSONAL
SENSITIVITY_PRIVATE
SENSITIVITY_CONFIDENTIAL
BUSYSTATUS_FREE
BUSYSTATUS_TENTATIVE
BUSYSTATUS_BUSY
BUSYSTATUS_OUT
BUSYSTATUS_ELSEWHERE
IS_ALL_DAY
MEETING_NOT_MEETING
MEETING_IS_MEETING
MEETING_RECEIVED
MEETING_CANCELLED
MEETING_CANCELLED_RECEIVED
RESPONSE_NONE
RESPONSE_ORGANIZER
RESPONSE_TENTATIVE
RESPONSE_ACCEPTED
RESPONSE_DECLINED
RESPONSE_NORESPONSE
_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

POOMCAL_TIMEZONE

POOMCAL_TIMEZONE

POOMCAL_ALLDAYEVENT

POOMCAL_ALLDAYEVENT

POOMCAL_ATTENDEES

POOMCAL_ATTENDEES

POOMCAL_ATTENDEE

POOMCAL_ATTENDEE

POOMCAL_ATTENDEESTATUS

POOMCAL_ATTENDEESTATUS

POOMCAL_ATTENDEETYPE

POOMCAL_ATTENDEETYPE

POOMCAL_EMAIL

POOMCAL_EMAIL

POOMCAL_NAME

POOMCAL_NAME

POOMCAL_BODY

POOMCAL_BODY

POOMCAL_BODYTRUNCATED

POOMCAL_BODYTRUNCATED

POOMCAL_BUSYSTATUS

POOMCAL_BUSYSTATUS

POOMCAL_CATEGORIES

POOMCAL_CATEGORIES

POOMCAL_CATEGORY

POOMCAL_CATEGORY

POOMCAL_RTF

POOMCAL_RTF

POOMCAL_DTSTAMP

POOMCAL_DTSTAMP

POOMCAL_ENDTIME

POOMCAL_ENDTIME

POOMCAL_EXCEPTION

POOMCAL_EXCEPTION

POOMCAL_EXCEPTIONS

POOMCAL_EXCEPTIONS

POOMCAL_DELETED

POOMCAL_DELETED

POOMCAL_EXCEPTIONSTARTTIME

POOMCAL_EXCEPTIONSTARTTIME

POOMCAL_LOCATION

POOMCAL_LOCATION

POOMCAL_MEETINGSTATUS

POOMCAL_MEETINGSTATUS

POOMCAL_ORGANIZEREMAIL

POOMCAL_ORGANIZEREMAIL

POOMCAL_ORGANIZERNAME

POOMCAL_ORGANIZERNAME

POOMCAL_RECURRENCE

POOMCAL_RECURRENCE

POOMCAL_TYPE

POOMCAL_TYPE

POOMCAL_UNTIL

POOMCAL_UNTIL

POOMCAL_OCCURRENCES

POOMCAL_OCCURRENCES

POOMCAL_INTERVAL

POOMCAL_INTERVAL

POOMCAL_DAYOFWEEK

POOMCAL_DAYOFWEEK

POOMCAL_DAYOFMONTH

POOMCAL_DAYOFMONTH

POOMCAL_WEEKOFMONTH

POOMCAL_WEEKOFMONTH

POOMCAL_MONTHOFYEAR

POOMCAL_MONTHOFYEAR

POOMCAL_REMINDER

POOMCAL_REMINDER

POOMCAL_SENSITIVITY

POOMCAL_SENSITIVITY

POOMCAL_SUBJECT

POOMCAL_SUBJECT

POOMCAL_STARTTIME

POOMCAL_STARTTIME

POOMCAL_UID

POOMCAL_UID

POOMCAL_DISALLOWNEWTIMEPROPOSAL

POOMCAL_DISALLOWNEWTIMEPROPOSAL

POOMCAL_RESPONSEREQUESTED

POOMCAL_RESPONSEREQUESTED

POOMCAL_APPOINTMENTREPLYTIME

POOMCAL_APPOINTMENTREPLYTIME

POOMCAL_CALENDARTYPE

POOMCAL_CALENDARTYPE

POOMCAL_ISLEAPMONTH

POOMCAL_ISLEAPMONTH

POOMCAL_RESPONSETYPE

POOMCAL_RESPONSETYPE

POOMCAL_FIRSTDAYOFWEEK

POOMCAL_FIRSTDAYOFWEEK

POOMCAL_CLIENTUID

POOMCAL_CLIENTUID

SENSITIVITY_NORMAL

SENSITIVITY_NORMAL

SENSITIVITY_PERSONAL

SENSITIVITY_PERSONAL

SENSITIVITY_PRIVATE

SENSITIVITY_PRIVATE

SENSITIVITY_CONFIDENTIAL

SENSITIVITY_CONFIDENTIAL

BUSYSTATUS_FREE

BUSYSTATUS_FREE

BUSYSTATUS_TENTATIVE

BUSYSTATUS_TENTATIVE

BUSYSTATUS_BUSY

BUSYSTATUS_BUSY

BUSYSTATUS_OUT

BUSYSTATUS_OUT

BUSYSTATUS_ELSEWHERE

BUSYSTATUS_ELSEWHERE

IS_ALL_DAY

IS_ALL_DAY

MEETING_NOT_MEETING

MEETING_NOT_MEETING

MEETING_IS_MEETING

MEETING_IS_MEETING

MEETING_RECEIVED

MEETING_RECEIVED

MEETING_CANCELLED

MEETING_CANCELLED

MEETING_CANCELLED_RECEIVED

MEETING_CANCELLED_RECEIVED

RESPONSE_NONE

RESPONSE_NONE

RESPONSE_ORGANIZER

RESPONSE_ORGANIZER

RESPONSE_TENTATIVE

RESPONSE_TENTATIVE

RESPONSE_ACCEPTED

RESPONSE_ACCEPTED

RESPONSE_DECLINED

RESPONSE_DECLINED

RESPONSE_NORESPONSE

RESPONSE_NORESPONSE

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

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

Override parent class' method. In EAS 16.0, top level appointment properties are ALWAYS ghosted if they are not explicitly sent.

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.

setTimezone()

setTimezone(mixed  $date) 

Set the timezone

Parameters

mixed $date

Either a Horde_Date or timezone descriptor such as America/New_York etc...

Throws

\InvalidArgumentException

getTimezone()

getTimezone() : string

Get the event's timezone

Returns

string —

The timezone identifier

setDTStamp()

setDTStamp(  $date) 

Set the appointment's modify timestamp

Parameters

$date

getDTStamp()

getDTStamp() : \Horde_Date

Get the appointment's dtimestamp

Returns

\Horde_Date —

The timestamp.

setDatetime()

setDatetime(array  $datetime = array()) 

Set the appointment time/duration.

Parameters

array $datetime

An array containing:

  • start: (Horde_Date) The start time.
  • end: (Horde_Date) The end time. If omitted, must include duration or allday.
  • duration: (integer) The event duration in seconds.
  • allday: (boolean) If true, this is an allday event.

Throws

\InvalidArgumentException

getDatetime()

getDatetime() : array

Get the appointment's time data

Returns

array —

An array containing:

  • start: (Horde_Date) The start time.
  • end: (Horde_Date) The end time.
  • allday: (boolean) If true, this is an allday event. @deprecated

setSubject()

setSubject(string  $subject) 

Set the appointment subject field.

Parameters

string $subject

A UTF-8 string

getSubject()

getSubject() : string

Get the subject

Returns

string —

The UTF-8 subject string

setUid()

setUid(string  $uid) 

Set the appointment uid. Note that this is the client's UID value, and not the value that the server normally uses for the UID. ActiveSync messages do not normally include any server uid value as part of the message directly. This causes issues with meeting requests since most clients will use the CLIENT_ENTRY_ID for this value, and will send the invitation email out using this value as the UID so we sort-of HAVE to use this value as the server's UID.

Parameters

string $uid

The server's uid for this appointment

getUid()

getUid() : string

Get the client's UID. See not above regarding server UIDs.

Returns

string

setServerUID()

setServerUID(string  $uid) 

Because the client doesn't pass the server uid as part of the message, we need to add it manually so the backend can have access to it when changing this object.

Parameters

string $uid

The server UID

getServerUID()

getServerUID() : string

Obtain the server UID. See note above.

Returns

string

setOrganizer()

setOrganizer(array  $organizer) 

Set the organizer name and/or email

Parameters

array $organizer

getOrganizer()

getOrganizer() : array

Get the details for the appointment organizer

Returns

array —

with 'name' and 'email' values

setLocation()

setLocation(string  $location) 

Set appointment location field.

Parameters

string $location

getLocation()

getLocation() : string

Get the location field

Returns

string

setRecurrence()

setRecurrence(\Horde_Date_Recurrence  $recurrence, integer  $fdow = null) 

Set recurrence information for this appointment

Parameters

\Horde_Date_Recurrence $recurrence

The recurrence data.

integer $fdow

The first day of the week. (A Horde_ActiveSync_Message_Recurrence:: constant). @since 2.4.0

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

getExceptions()

getExceptions() : array

Return the exceptions for this appointment.

Returns

array —

An array of Horde_ActiveSync_Message_Exception objects

setSensitivity()

setSensitivity(integer  $sensitivity) 

Set the sensitivity level for this appointment.

Should be one of: normal, personal, private, confidential

Parameters

integer $sensitivity

The SENSITIVITY constant

getSensitivity()

getSensitivity() : integer

Return the sensitivity setting for this appointment

Returns

integer —

The SENSITIVITY constant

setBusyStatus()

setBusyStatus(integer  $busy) 

Sets the busy status for this appointment

Parameters

integer $busy

The BUSYSTATUS constant

getBusyStatus()

getBusyStatus() : integer

Return the busy status for this appointment.

Returns

integer —

The BUSYSTATUS constant

setResponseType()

setResponseType(integer  $response) 

Set user response type. Should be one of: none, organizer, tentative, accepted, declined

Parameters

integer $response

The response type constant

getResponseType()

getResponseType() : integer

Get response type

Returns

integer —

The responsetype constant

setReminder()

setReminder(integer  $minutes) 

Set reminder for this appointment.

Parameters

integer $minutes

The number of minutes before appintment to trigger a reminder.

getReminder()

getReminder() : integer|boolean

Get the reminder time.

Returns

integer|boolean —

Number of minutes before appointment for notifications or false if not set.

setMeetingStatus()

setMeetingStatus(integer  $status) 

Set the status for this appointment. Should be one of: none, meeting, received, canceled, canceledreceived.

Parameters

integer $status

A MEETING_* constant

getMeetingStatus()

getMeetingStatus() : integer

Return the meeting status for this meeting.

Returns

integer —

A MEETING_* constant

addAttendee()

addAttendee(array  $attendee) 

Add an attendee to this appointment

Parameters

array $attendee

'name', 'email' for each attendee

getAttendees()

getAttendees() : array

Get a list of this event's attendees

Returns

array —

An array of 'name' and 'email' hashes

setBody()

setBody(string  $body) 

Set the appointment's body

Parameters

string $body

UTF-8 encoded string

getBody()

getBody() : string

Get the appointment's body

Returns

string —

UTF-8 encoded string

addCategory()

addCategory(string  $category) 

Add a category to the appointment

Parameters

string $category

getCategories()

getCategories() : array

Return this appointments tags/categories.

Returns

array

getClass()

getClass() : string

Return the collection class name the object is for.

Returns

string

_validateDecodedValues()

_validateDecodedValues() : boolean

Give concrete classes the chance to enforce rules on property values.

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

Checks to see if we should send an empty value.

Parameters

string $tag

The tag name

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