PHP 클래스 Horde_ActiveSync_Device, horde

저자: Michael J Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_clientType string Local override/cache of detected clientType.
$_dirty array Dirty flag
$_iOSVersion string Cache of OS version.
$_multiplexSet boolean Flag to indicate self::multiplex was set externally.
$_properties array Device properties.
$_state Horde_ActiveSync_State_Base State handler

공개 메소드들

메소드 설명
__construct ( Horde_ActiveSync_State_Base $state, array $data = [] ) Const'r
__get ( $property ) Getter
__isset ( $property ) Magic isset
__set ( $property, $value ) Setter
enforceProvisioning ( ) : boolean Check if we should enforce provisioning on this device.
getFormattedDeviceProperties ( ) : array Return an array of DEVICEINFO data, with keys suitable for displaying.
getLastSyncTimestamp ( ) : integer Return the last time the device issued a SYNC request.
getMajorVersion ( ) : integer Return the major version number of the OS (or client app) as reported by the client.
getMinorVersion ( ) : integer Return the minor version number of the OS (or client app) as reported by the client.
hasQuirk ( integer $quirk ) : boolean Return if this client has the described quirk.
isNonProvisionable ( ) : boolean Returns if the current device is an expected non-provisionable device.
needsVersionUpdate ( string $supported ) : boolean Indicates if we need to announce new EAS version string to the client.
normalizePoomContactsDates ( Horde_Date $date, boolean $toEas = false ) : Horde_Date Return the number of hours to offset a POOMCONTACTS:BIRTHDAY or ANNIVERSARY field in an attempt to work around a bug in the protocol - which doesn't define a standard time for birthdays to occur.
save ( boolean $all = true ) Save the dirty device info data.
setDeviceProperties ( array $data ) Set the device's DEVICEINFO data.

보호된 메소드들

메소드 설명
_getClientType ( ) : string Attempt to determine the *client* application as opposed to the device, which may or may not be the client.
_getIosVersion ( ) Detects the iOS version in M.m format and caches locally.
_isIos ( ) : boolean Return if this client is an iOS device. Different versions require different checks.
_isNine ( ) : boolean Helper method to sniff out the 9Folders client, "Nine".
_sniffMultiplex ( ) Basic sniffing for determining if devices can support non-multiplexed collections.

메소드 상세

__construct() 공개 메소드

Const'r
public __construct ( Horde_ActiveSync_State_Base $state, array $data = [] )
$state Horde_ActiveSync_State_Base The state driver.
$data array The current device data.

__get() 공개 메소드

Getter
public __get ( $property )

__isset() 공개 메소드

Magic isset
public __isset ( $property )

__set() 공개 메소드

Setter
public __set ( $property, $value )

_getClientType() 보호된 메소드

Attempt to determine the *client* application as opposed to the device, which may or may not be the client.
protected _getClientType ( ) : string
리턴 string The client name.

_getIosVersion() 보호된 메소드

Detects the iOS version in M.m format and caches locally.
protected _getIosVersion ( )

_isIos() 보호된 메소드

Return if this client is an iOS device. Different versions require different checks.
protected _isIos ( ) : boolean
리턴 boolean [description]

_isNine() 보호된 메소드

Helper method to sniff out the 9Folders client, "Nine".
또한 보기: https://ninefolders.plan.io/track/7048/46b213 for the discussion on how to sniff out the Nine client. Not the best solution, but it's the one they decided to use.
protected _isNine ( ) : boolean
리턴 boolean True if client is thought to be "Nine".

_sniffMultiplex() 보호된 메소드

Basic sniffing for determining if devices can support non-multiplexed collections.
protected _sniffMultiplex ( )

enforceProvisioning() 공개 메소드

Check if we should enforce provisioning on this device.
public enforceProvisioning ( ) : boolean
리턴 boolean

getFormattedDeviceProperties() 공개 메소드

Return an array of DEVICEINFO data, with keys suitable for displaying.

getLastSyncTimestamp() 공개 메소드

Return the last time the device issued a SYNC request.
public getLastSyncTimestamp ( ) : integer
리턴 integer The timestamp.

getMajorVersion() 공개 메소드

Return the major version number of the OS (or client app) as reported by the client.
public getMajorVersion ( ) : integer
리턴 integer The version number.

getMinorVersion() 공개 메소드

Return the minor version number of the OS (or client app) as reported by the client.
public getMinorVersion ( ) : integer
리턴 integer The version number.

hasQuirk() 공개 메소드

Return if this client has the described quirk.
public hasQuirk ( integer $quirk ) : boolean
$quirk integer The specified quirk to check for.
리턴 boolean True if quirk is present.

isNonProvisionable() 공개 메소드

I.e., the client does not support provisioning at all, but should still be allowed to connect to a server that has provisioning set to Force. Currently, this only applies to Windows Communication Apps (Outlook 2013).
public isNonProvisionable ( ) : boolean
리턴 boolean True if the device should be allowed to connect to a Forced provision server. False if not.

needsVersionUpdate() 공개 메소드

If the property is empty, we don't send it since we are sending the EAS-Version header anyway and this is a new device.
public needsVersionUpdate ( string $supported ) : boolean
$supported string The current EAS-Version header.
리턴 boolean True if we need to send the MS-RP header, otherwise false.

normalizePoomContactsDates() 공개 메소드

WP: Devices seem to send the birthdays at the entered date, with a time of 00:00:00 UTC during standard time and with 01:00:00 UTC during DST if the client's configured timezone observes it. No idea what purpose this serves since no timezone data is transmitted for birthday values. iOS: Seems different based on version. iOS 5+, at least seems to send the birthday as midnight at the entered date in the device's timezone then converted to UTC. Some minor issues with offsets being off an hour or two for some timezones though. iOS < 5 sends the birthday time part as the time the birthday was entered/edited on the device, converted to UTC, so it can't be trusted at all. The best we can do here is transform the date to midnight on date_default_timezone() converted to UTC. Android: For contacts originating on the SERVER, the following is true: Stock 4.3 Takes the down-synched bday value which is assumed to be UTC, does some magic to it (converts to milliseconds, creates a gregorian calendar object, then converts to YYYY-MM-DD). When sending the bday value up, it sends it up as-is. No conversion to/from UTC or local is done. Stock 4.4.x does the above, but before sending the bday value, validates that it's in a correct format for sending to the server. This really only affects date data originally entered on the device for non-stock android clients. There is some strange bit of code in Android that adds 1 to the DAY_OF_MONTH when HOUR_OF_DAY >= 12 in an attempt to "fix" birthday handling for GMT+n users. See: https://android.googlesource.com/platform/packages/apps/Exchange/+/32daacdd71b9de8fd5e3f59c37934e3e4a9fa972%5E!/exchange2/src/com/android/exchange/adapter/ContactsSyncAdapter.java Not sure what to make of it, or why it's not just converted to local tz when displaying but this probably breaks birthday handling for people in a few timezones. For contacts originating on the CLIENT, the datetime is sent as 08:00:00 UTC, and this seems to be regardless of the timezone set in the Android system. Given all of this, it makes sense to me to ALWAYS send birthday data as occuring at 08:00:00 UTC for *native* Android clients. BB 10+ expects it at 11:00:00 UTC
public normalizePoomContactsDates ( Horde_Date $date, boolean $toEas = false ) : Horde_Date
$date Horde_Date The date. This should normally be in the local timezone if encoding the date for the client. If decoding the date from the client, it will normally be in UTC.
$toEas boolean Convert from local to device if true. DEFAULT: false
리턴 Horde_Date The date of the birthday/anniversary, with any fixes applied for the current device. The timezone set in the object will depend on the client detected, and whether the date is being encoding or decoding.

save() 공개 메소드

Save the dirty device info data.
public save ( boolean $all = true )
$all boolean If true, save all properties (deviceInfo and deviceProperties). Otherwise, just save dirty deviceProperties. @since 2.16.0

setDeviceProperties() 공개 메소드

Set the device's DEVICEINFO data.
public setDeviceProperties ( array $data )
$data array The data array sent from the device.

프로퍼티 상세

$_clientType 보호되어 있는 프로퍼티

Local override/cache of detected clientType.
protected string $_clientType
리턴 string

$_dirty 보호되어 있는 프로퍼티

Dirty flag
protected array $_dirty
리턴 array

$_iOSVersion 보호되어 있는 프로퍼티

Cache of OS version.
protected string $_iOSVersion
리턴 string

$_multiplexSet 보호되어 있는 프로퍼티

Flag to indicate self::multiplex was set externally.
protected bool $_multiplexSet
리턴 boolean

$_properties 보호되어 있는 프로퍼티

Device properties.
protected array $_properties
리턴 array

$_state 보호되어 있는 프로퍼티

State handler
protected Horde_ActiveSync_State_Base $_state
리턴 Horde_ActiveSync_State_Base