PHP 클래스 Horde_ActiveSync_Driver_Mock, horde

저자: Michael J Rubinsky ([email protected])
상속: extends Horde_ActiveSync_Driver_Base
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_auth
$_connector
$_displayMap
$_imap

공개 메소드들

메소드 설명
__construct ( $params = [] )
autoDiscover ( ) : array Return properties for an AUTODISCOVER request.
changeFolder ( string $id, string $displayname, string $parent, string $uid = null ) Change a folder on the server.
changeMessage ( string $folderid, string $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device ) : array | boolean Add/Edit a message
deleteFolder ( string $id, string $parent = Horde_ActiveSync::FOLDER_ROOT ) Delete a folder on the server.
deleteMessage ( string $folderid, array $ids ) Delete a message
getAttachment ( string $name, array $options = [] ) : array Return the specified attachment.
getCurrentPolicy ( ) : array Return the security policies.
getFolder ( string $id ) : Horde_ActiveSync_Message_Folder Return the ActiveSync message object for the specified folder.
getFolderList ( ) : array Get the list of folder stat arrays @see self::statFolder()
getFolders ( ) : array Return an array of the server's folder objects.
getFreebusy ( string $user, array $options = [] ) : mixed Request freebusy information from the server
getHeartbeatConfig ( )
getMessage ( string $folderid, string $id, array $collection ) : Horde_ActiveSync_Message_Base Obtain an ActiveSync message from the backend.
getProvisioning ( ) : mixed Returns the provisioning support for the current request.
getSearchResults ( string $type, array $query ) : array Returns array of items which contain contact information
getServerChanges ( string $folderId, integer $from_ts, integer $to_ts, integer $cutoffdate, boolean $ping ) : array Get a list of server changes that occured during the specified time period.
getSettings ( array $settings, Horde_ActiveSync_Device $device ) : array Return settings from the backend for a SETTINGS request.
getSpecialFolderNameByType ( string $type ) : string Return the server id of the specified special folder type.
getUsernameFromEmail ( string $email ) : string Attempt to guess a username based on the email address passed from EAS Autodiscover requests.
getWasteBasket ( string $class ) : string | boolean Get the wastebasket folder.
itemOperationsFetchMailbox ( string $longid, array $bodyprefs, boolean $mimesupport ) : Horde_ActiveSync_Message_Base Returnmail object represented by the specified longid. Used to fetch email objects from a search result, which only returns a 'longid'.
itemOperationsGetAttachmentData ( string $filereference ) Return the specified attachement data for an ITEMOPERATIONS request.
itemOperationsGetDocumentLibraryLink ( string $linkid, array $cred ) : array Return a documentlibrary item.
meetingResponse ( array $response ) : string Hanlde meeting responses.
moveMessage ( string $folderid, array $ids, string $newfolderid ) : array Move message
resolveRecipient ( string $type, string $search, array $options = [] ) : array Handle ResolveRecipient requests
sendMail ( mixed $rfc822, integer $forward = null, integer $reply = null, string $parent = null, boolean $save = true ) : boolean Sends the email represented by the rfc822 string received by the client.
setReadFlag ( string $folderid, integer $uid, integer $flag ) Set the read (\seen) flag on the specified message.
setSettings ( array $settings, Horde_ActiveSync_Device $device ) : array Set backend settings from a SETTINGS request.
statFolder ( string $id, mixed $parent, mixed $mod = null ) : a Stat folder. Note that since the only thing that can ever change for a folder is the name, we use that as the 'mod' value.
statMailMessage ( string $folderid, integer | array $id ) : array Build a stat structure for an email message.
statMessage ( string $folderId, string $id ) : hash Get a message stat.

보호된 메소드들

메소드 설명
_buildNonMailFolder ( string $id, stirng $parent, integer $type, string $name ) : Horde_ActiveSync_Message_Folder Helper to build a folder object for non-email folders.
_getFolderUidForBackendId ( $sid, $type = null, $old_id = null )
_getMailFolder ( $sid, array $fl, array $f )
_getMailFolders ( ) : array Return the list of mail server folders.

메소드 상세

__construct() 공개 메소드

public __construct ( $params = [] )

_buildNonMailFolder() 보호된 메소드

Helper to build a folder object for non-email folders.
protected _buildNonMailFolder ( string $id, stirng $parent, integer $type, string $name ) : Horde_ActiveSync_Message_Folder
$id string The folder's server id.
$parent stirng The folder's parent id.
$type integer The folder type.
$name string The folder description.
리턴 Horde_ActiveSync_Message_Folder The folder object.

_getFolderUidForBackendId() 보호된 메소드

protected _getFolderUidForBackendId ( $sid, $type = null, $old_id = null )

_getMailFolder() 보호된 메소드

protected _getMailFolder ( $sid, array $fl, array $f )
$fl array
$f array

_getMailFolders() 보호된 메소드

Return the list of mail server folders.
protected _getMailFolders ( ) : array
리턴 array An array of Horde_ActiveSync_Message_Folder objects.

autoDiscover() 공개 메소드

Return properties for an AUTODISCOVER request.
public autoDiscover ( ) : array
리턴 array An array of properties.

changeFolder() 공개 메소드

Change a folder on the server.
public changeFolder ( string $id, string $displayname, string $parent, string $uid = null )
$id string The server's folder id
$displayname string The new display name.
$parent string The folder's parent, if needed.
$uid string The existing folder uid, if this is an edit. @since 2.5.0 (@todo Look at this for H6. It's here now to save an extra DB lookup for data we already have.)

changeMessage() 공개 메소드

Add/Edit a message
public changeMessage ( string $folderid, string $id, Horde_ActiveSync_Message_Base $message, Horde_ActiveSync_Device $device ) : array | boolean
$folderid string The server id for the folder the message belongs to.
$id string The server's uid for the message if this is a change to an existing message, null if new.
$message Horde_ActiveSync_Message_Base The activesync message
$device Horde_ActiveSync_Device The device information
리턴 array | boolean A stat array if successful, otherwise false.

deleteFolder() 공개 메소드

Delete a folder on the server.
public deleteFolder ( string $id, string $parent = Horde_ActiveSync::FOLDER_ROOT )
$id string The server's folder id.
$parent string The folder's parent, if needed.

deleteMessage() 공개 메소드

Delete a message
public deleteMessage ( string $folderid, array $ids )
$folderid string The folder id containing the messages.
$ids array An array of message ids to delete.

getAttachment() 공개 메소드

Return the specified attachment.
public getAttachment ( string $name, array $options = [] ) : array
$name string The attachment identifier. For this driver, this consists of 'mailbox:uid:mimepart'
$options array Any options requested. Currently supported: - stream: (boolean) Return a stream resource for the mime contents.
리턴 array The attachment in the form of an array with the following structure: array('content-type' => {the content-type of the attachement}, 'data' => {the raw attachment data})

getCurrentPolicy() 공개 메소드

Return the security policies.
public getCurrentPolicy ( ) : array
리턴 array An array of provisionable properties and values.

getFolder() 공개 메소드

Return the ActiveSync message object for the specified folder.
public getFolder ( string $id ) : Horde_ActiveSync_Message_Folder
$id string The folder's server id.
리턴 Horde_ActiveSync_Message_Folder object.

getFolderList() 공개 메소드

Get the list of folder stat arrays @see self::statFolder()
public getFolderList ( ) : array
리턴 array An array of folder stat arrays.

getFolders() 공개 메소드

Return an array of the server's folder objects.
public getFolders ( ) : array
리턴 array An array of Horde_ActiveSync_Message_Folder objects.

getFreebusy() 공개 메소드

Request freebusy information from the server
public getFreebusy ( string $user, array $options = [] ) : mixed
$user string The user to request FB information for.
$options array Options.
리턴 mixed boolean|array The FB information, if available. Otherwise false.

getHeartbeatConfig() 공개 메소드

public getHeartbeatConfig ( )

getMessage() 공개 메소드

Obtain an ActiveSync message from the backend.
public getMessage ( string $folderid, string $id, array $collection ) : Horde_ActiveSync_Message_Base
$folderid string The server's folder id this message is from
$id string The server's message id
$collection array The colletion data. May contain things like: - mimesupport: (boolean) Indicates if the device has MIME support. DEFAULT: false (No MIME support) - truncation: (integer) The truncation constant, if sent by the device. DEFAULT: 0 (No truncation) - bodyprefs: (array) The bodypref array from the device.
리턴 Horde_ActiveSync_Message_Base The message data

getProvisioning() 공개 메소드

Returns the provisioning support for the current request.
public getProvisioning ( ) : mixed
리턴 mixed The value of the provisiong support flag.

getSearchResults() 공개 메소드

Returns array of items which contain contact information
public getSearchResults ( string $type, array $query ) : array
$type string The search type; ['gal'|'mailbox']
$query array The search query. An array containing: - query: (string) The search term. DEFAULT: none, REQUIRED - range: (string) A range limiter. DEFAULT: none (No range used).
리턴 array An array containing: - rows: An array of search results - status: The search store status code.

getServerChanges() 공개 메소드

Get a list of server changes that occured during the specified time period.
public getServerChanges ( string $folderId, integer $from_ts, integer $to_ts, integer $cutoffdate, boolean $ping ) : array
$folderId string The server id of the collection to check.
$from_ts integer The starting timestamp.
$to_ts integer The ending timestamp.
$cutoffdate integer The earliest date to retrieve back to.
$ping boolean If true, returned changeset may not contain the full changeset, may only contain a single change, designed only to indicate *some* change has taken place. The value should not be used to determine *what* change has taken place.
리턴 array A list of messge uids that have chnaged in the specified time period.

getSettings() 공개 메소드

Return settings from the backend for a SETTINGS request.
public getSettings ( array $settings, Horde_ActiveSync_Device $device ) : array
$settings array An array of settings to return.
$device Horde_ActiveSync_Device The device to obtain settings for.
리턴 array The requested settings.

getSpecialFolderNameByType() 공개 메소드

Return the server id of the specified special folder type.
public getSpecialFolderNameByType ( string $type ) : string
$type string The self::SPECIAL_* constant.
리턴 string The folder's server id.

getUsernameFromEmail() 공개 메소드

Attempt to guess a username based on the email address passed from EAS Autodiscover requests.
public getUsernameFromEmail ( string $email ) : string
$email string The email address
리턴 string The username to use to authenticate to Horde with.

getWasteBasket() 공개 메소드

Get the wastebasket folder.
public getWasteBasket ( string $class ) : string | boolean
$class string The collection class.
리턴 string | boolean Returns name of the trash folder, or false if not using a trash folder.

itemOperationsFetchMailbox() 공개 메소드

Returnmail object represented by the specified longid. Used to fetch email objects from a search result, which only returns a 'longid'.
public itemOperationsFetchMailbox ( string $longid, array $bodyprefs, boolean $mimesupport ) : Horde_ActiveSync_Message_Base
$longid string The unique search result identifier.
$bodyprefs array The bodypreference array.
$mimesupport boolean Mimesupport flag.
리턴 Horde_ActiveSync_Message_Base The message requested.

itemOperationsGetAttachmentData() 공개 메소드

Return the specified attachement data for an ITEMOPERATIONS request.
public itemOperationsGetAttachmentData ( string $filereference )
$filereference string The attachment identifier.

meetingResponse() 공개 메소드

Hanlde meeting responses.
public meetingResponse ( array $response ) : string
$response array The response data. Contains: - requestid: The identifier of the meeting request. Used by the server to fetch the original meeting request details. - response: The user's response to the request. One of the response code constants. - folderid: The collection id that contains the meeting request.
리턴 string The UID of any created calendar entries, otherwise false.

moveMessage() 공개 메소드

Move message
public moveMessage ( string $folderid, array $ids, string $newfolderid ) : array
$folderid string Existing folder id
$ids array Message UIDs
$newfolderid string The new folder id
리턴 array The new uids for the message.

resolveRecipient() 공개 메소드

Handle ResolveRecipient requests
public resolveRecipient ( string $type, string $search, array $options = [] ) : array
$type string The type of recipient request. e.g., 'certificate'
$search string The email to resolve.
$options array
리턴 array An array of results containing any of the following: - type: (string) The type of result a GAL entry or personal address book entry. A Horde_ActiveSync::RESOLVE_RESULT constant. - displayname: (string) The display name of the contact. - emailaddress: (string) The emailaddress. - entries: (array) An array of certificates. - availability: (string) A EAS style FB string. - picture: (Horde_ActiveSync_Message_ResolveRecipientsPicture)

sendMail() 공개 메소드

Sends the email represented by the rfc822 string received by the client.
public sendMail ( mixed $rfc822, integer $forward = null, integer $reply = null, string $parent = null, boolean $save = true ) : boolean
$rfc822 mixed The rfc822 mime message, a string or stream resource.
$forward integer The UID of the message, if forwarding.
$reply integer The UID of the message if replying.
$parent string The collection id of parent message if forwarding/replying.
$save boolean Save in sent messages.
리턴 boolean

setReadFlag() 공개 메소드

Set the read (\seen) flag on the specified message.
사용 중단: Will be removed in 3.0, use changeMessage() instead.
public setReadFlag ( string $folderid, integer $uid, integer $flag )
$folderid string The folder id containing the message.
$uid integer The message IMAP UID.
$flag integer The value to set the flag to.

setSettings() 공개 메소드

Set backend settings from a SETTINGS request.
public setSettings ( array $settings, Horde_ActiveSync_Device $device ) : array
$settings array The settings to store.
$device Horde_ActiveSync_Device The device to store settings for.
리턴 array An array of status responses for each set request. e.g.,: array('oof' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS, 'deviceinformation' => Horde_ActiveSync_Request_Settings::STATUS_SUCCESS) { }

statFolder() 공개 메소드

Stat folder. Note that since the only thing that can ever change for a folder is the name, we use that as the 'mod' value.
public statFolder ( string $id, mixed $parent, mixed $mod = null ) : a
$id string The folder id
$parent mixed The parent folder (or 0 if none).
$mod mixed Modification indicator. For folders, this is the name of the folder, since that's the only thing that can change.
리턴 a stat hash

statMailMessage() 공개 메소드

Build a stat structure for an email message.
public statMailMessage ( string $folderid, integer | array $id ) : array
$folderid string The mailbox name.
$id integer | array The message(s) to stat (IMAP UIDs).
리턴 array

statMessage() 공개 메소드

Get a message stat.
public statMessage ( string $folderId, string $id ) : hash
$folderId string The folder id
$id string The message id (??)
리턴 hash with 'id', 'mod', and 'flags' members

프로퍼티 상세

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

protected $_auth

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

protected $_connector

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

protected $_displayMap

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

protected $_imap