Documentation

Horde_Kolab_Storage_Driver_Mock_Data
in package
implements ArrayAccess

Data storage for the mock driver.

Copyright 2010-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Interfaces, Classes, Traits and Enums

ArrayAccess

Table of Contents

FLAG_DELETED  = 1
Flag to indicated a deleted message
$_data  : array<string|int, mixed>
The data array.
$_selected  : string
The currently selected folder.
__construct()  : mixed
Constructor.
_notDeleted()  : bool
Indicates if a message is considered deleted.
appendMessage()  : mixed
Appends a message to the given folder.
arrayKeys()  : array<string|int, mixed>
Returns the array keys of this array.
deleteAnnotation()  : mixed
deleteMessages()  : mixed
deleteUserPermissions()  : mixed
expunge()  : mixed
fetchBodypart()  : resource
Retrieves a bodypart for the given message ID and mime part ID.
fetchComplete()  : mixed
fetchStructure()  : array<string|int, mixed>
Retrieves the messages for the given message ids.
getAnnotation()  : mixed
getPermissions()  : mixed
getUids()  : mixed
getUserPermissions()  : mixed
hasAnnotation()  : mixed
hasPermissions()  : mixed
hasUserPermissions()  : mixed
moveMessage()  : mixed
offsetExists()  : bool
Tests if the value of the given offset exists in this array.
offsetGet()  : mixed
Returns the value of the given offset in this array.
offsetSet()  : void
Sets the value of the given offset in this array.
offsetUnset()  : void
Removes the given offset exists from this array.
select()  : mixed
setAnnotation()  : mixed
setUserPermissions()  : mixed
status()  : mixed
_convertBrief()  : mixed
Generate the internal mock data representation from an abbreviated mock data format.

Constants

FLAG_DELETED

Flag to indicated a deleted message

public mixed FLAG_DELETED = 1

Properties

$_data

The data array.

private array<string|int, mixed> $_data

$_selected

The currently selected folder.

private string $_selected

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

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

Return values
mixed

_notDeleted()

Indicates if a message is considered deleted.

public _notDeleted(array<string|int, mixed> $message) : bool
Parameters
$message : array<string|int, mixed>

The message information.

Return values
bool

True if the message has not been marked as deleted.

appendMessage()

Appends a message to the given folder.

public appendMessage(string $folder, resource $msg) : mixed
Parameters
$folder : string

The folder to append the message(s) to.

$msg : resource

The message to append.

Return values
mixed

True or the UID of the new message in case the backend supports UIDPLUS.

arrayKeys()

Returns the array keys of this array.

public arrayKeys() : array<string|int, mixed>
Return values
array<string|int, mixed>

The keys of this array.

deleteAnnotation()

public deleteAnnotation(mixed $folder, mixed $annotation) : mixed
Parameters
$folder : mixed
$annotation : mixed
Return values
mixed

deleteMessages()

public deleteMessages(mixed $folder, mixed $uids) : mixed
Parameters
$folder : mixed
$uids : mixed
Return values
mixed

deleteUserPermissions()

public deleteUserPermissions(mixed $folder, mixed $user) : mixed
Parameters
$folder : mixed
$user : mixed
Return values
mixed

expunge()

public expunge(mixed $folder) : mixed
Parameters
$folder : mixed
Return values
mixed

fetchBodypart()

Retrieves a bodypart for the given message ID and mime part ID.

public fetchBodypart(string $folder, array<string|int, mixed> $uid, array<string|int, mixed> $id) : resource
Parameters
$folder : string

The folder to fetch the messages from.

$uid : array<string|int, mixed>

The message UID.

$id : array<string|int, mixed>

The mime part ID.

Return values
resource

The body part, as a stream resource.

fetchComplete()

public fetchComplete(mixed $folder, mixed $uid) : mixed
Parameters
$folder : mixed
$uid : mixed
Return values
mixed

fetchStructure()

Retrieves the messages for the given message ids.

public fetchStructure(string $folder, array<string|int, mixed> $uids) : array<string|int, mixed>
Parameters
$folder : string

The folder to fetch the messages from.

$uids : array<string|int, mixed>

The message UIDs.

Return values
array<string|int, mixed>

An array of message structures parsed into Horde_Mime_Part instances.

getAnnotation()

public getAnnotation(mixed $folder, mixed $annotation) : mixed
Parameters
$folder : mixed
$annotation : mixed
Return values
mixed

getPermissions()

public getPermissions(mixed $folder) : mixed
Parameters
$folder : mixed
Return values
mixed

getUids()

public getUids(mixed $folder) : mixed
Parameters
$folder : mixed
Return values
mixed

getUserPermissions()

public getUserPermissions(mixed $folder, mixed $user) : mixed
Parameters
$folder : mixed
$user : mixed
Return values
mixed

hasAnnotation()

public hasAnnotation(mixed $folder, mixed $annotation) : mixed
Parameters
$folder : mixed
$annotation : mixed
Return values
mixed

hasPermissions()

public hasPermissions(mixed $folder) : mixed
Parameters
$folder : mixed
Return values
mixed

hasUserPermissions()

public hasUserPermissions(mixed $folder, mixed $user) : mixed
Parameters
$folder : mixed
$user : mixed
Return values
mixed

moveMessage()

public moveMessage(mixed $uid, mixed $old_folder, mixed $new_folder) : mixed
Parameters
$uid : mixed
$old_folder : mixed
$new_folder : mixed
Return values
mixed

offsetExists()

Tests if the value of the given offset exists in this array.

public offsetExists(string|int $offset) : bool
Parameters
$offset : string|int

The array offset.

Return values
bool

True if the offset exists.

offsetGet()

Returns the value of the given offset in this array.

public offsetGet(string|int $offset) : mixed
Parameters
$offset : string|int

The array offset.

Return values
mixed

The data value.

offsetSet()

Sets the value of the given offset in this array.

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

The array offset.

$value : mixed
Return values
void

offsetUnset()

Removes the given offset exists from this array.

public offsetUnset(string|int $offset) : void
Parameters
$offset : string|int

The array offset.

Return values
void

select()

public select(mixed $folder) : mixed
Parameters
$folder : mixed
Return values
mixed

setAnnotation()

public setAnnotation(mixed $folder, mixed $annotation, mixed $value) : mixed
Parameters
$folder : mixed
$annotation : mixed
$value : mixed
Return values
mixed

setUserPermissions()

public setUserPermissions(mixed $folder, mixed $user, mixed $acl) : mixed
Parameters
$folder : mixed
$user : mixed
$acl : mixed
Return values
mixed

status()

public status(mixed $folder) : mixed
Parameters
$folder : mixed
Return values
mixed

_convertBrief()

Generate the internal mock data representation from an abbreviated mock data format.

private _convertBrief(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>

The abbreviated data format.

Tags
todo

Document the format

Return values
mixed

Search results