PHP Class Horde_Kolab_Storage_Driver_Mock_Data, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Inheritance: implements ArrayAccess
ファイルを表示 Open project: horde/horde Class Usage Examples

Public Methods

Method Description
__construct ( array $data ) Constructor.
_notDeleted ( array $message ) : boolean Indicates if a message is considered deleted.
appendMessage ( string $folder, resource $msg ) : mixed Appends a message to the given folder.
arrayKeys ( ) : array Returns the array keys of this array.
deleteAnnotation ( $folder, $annotation )
deleteMessages ( $folder, $uids )
deleteUserPermissions ( $folder, $user )
expunge ( $folder )
fetchBodypart ( string $folder, array $uid, array $id ) : resource Retrieves a bodypart for the given message ID and mime part ID.
fetchComplete ( $folder, $uid )
fetchStructure ( string $folder, array $uids ) : array Retrieves the messages for the given message ids.
getAnnotation ( $folder, $annotation )
getPermissions ( $folder )
getUids ( $folder )
getUserPermissions ( $folder, $user )
hasAnnotation ( $folder, $annotation )
hasPermissions ( $folder )
hasUserPermissions ( $folder, $user )
moveMessage ( $uid, $old_folder, $new_folder )
offsetExists ( string | integer $offset ) : boolean Tests if the value of the given offset exists in this array.
offsetGet ( string | integer $offset ) : mixed Returns the value of the given offset in this array.
offsetSet ( string | integer $offset, $value ) : null Sets the value of the given offset in this array.
offsetUnset ( string | integer $offset ) : null Removes the given offset exists from this array.
select ( $folder )
setAnnotation ( $folder, $annotation, $value )
setUserPermissions ( $folder, $user, $acl )
status ( $folder )

Private Methods

Method Description
_convertBrief ( array $data ) Generate the internal mock data representation from an abbreviated mock data format.

Method Details

__construct() public method

Constructor.
public __construct ( array $data )
$data array This may be match the internal format used by this class to represent the IMAP mock data or it can be an abbreviated format (@see Horde_Kolab_Storage_Driver_Mock_Data::_setupBrief).

_notDeleted() public method

Indicates if a message is considered deleted.
public _notDeleted ( array $message ) : boolean
$message array The message information.
return boolean True if the message has not been marked as deleted.

appendMessage() public method

Appends a message to the given folder.
public appendMessage ( string $folder, resource $msg ) : mixed
$folder string The folder to append the message(s) to.
$msg resource The message to append.
return mixed True or the UID of the new message in case the backend supports UIDPLUS.

arrayKeys() public method

Returns the array keys of this array.
public arrayKeys ( ) : array
return array The keys of this array.

deleteAnnotation() public method

public deleteAnnotation ( $folder, $annotation )

deleteMessages() public method

public deleteMessages ( $folder, $uids )

deleteUserPermissions() public method

public deleteUserPermissions ( $folder, $user )

expunge() public method

public expunge ( $folder )

fetchBodypart() public method

Retrieves a bodypart for the given message ID and mime part ID.
public fetchBodypart ( string $folder, array $uid, array $id ) : resource
$folder string The folder to fetch the messages from.
$uid array The message UID.
$id array The mime part ID.
return resource The body part, as a stream resource.

fetchComplete() public method

public fetchComplete ( $folder, $uid )

fetchStructure() public method

Retrieves the messages for the given message ids.
public fetchStructure ( string $folder, array $uids ) : array
$folder string The folder to fetch the messages from.
$uids array The message UIDs.
return array An array of message structures parsed into Horde_Mime_Part instances.

getAnnotation() public method

public getAnnotation ( $folder, $annotation )

getPermissions() public method

public getPermissions ( $folder )

getUids() public method

public getUids ( $folder )

getUserPermissions() public method

public getUserPermissions ( $folder, $user )

hasAnnotation() public method

public hasAnnotation ( $folder, $annotation )

hasPermissions() public method

public hasPermissions ( $folder )

hasUserPermissions() public method

public hasUserPermissions ( $folder, $user )

moveMessage() public method

public moveMessage ( $uid, $old_folder, $new_folder )

offsetExists() public method

Tests if the value of the given offset exists in this array.
public offsetExists ( string | integer $offset ) : boolean
$offset string | integer The array offset.
return boolean True if the offset exists.

offsetGet() public method

Returns the value of the given offset in this array.
public offsetGet ( string | integer $offset ) : mixed
$offset string | integer The array offset.
return mixed The data value.

offsetSet() public method

Sets the value of the given offset in this array.
public offsetSet ( string | integer $offset, $value ) : null
$offset string | integer The array offset.
return null

offsetUnset() public method

Removes the given offset exists from this array.
public offsetUnset ( string | integer $offset ) : null
$offset string | integer The array offset.
return null

select() public method

public select ( $folder )

setAnnotation() public method

public setAnnotation ( $folder, $annotation, $value )

setUserPermissions() public method

public setUserPermissions ( $folder, $user, $acl )

status() public method

public status ( $folder )