Documentation

Horde_Kolab_Storage_Object
in package
implements ArrayAccess, Serializable

Represents a single Kolab object.

Tags
todo

Clean up _attachments mess.

category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

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

Interfaces, Classes, Traits and Enums

ArrayAccess
Serializable

Table of Contents

ERROR_INVALID_KOLAB_PART  = 2
Indicates an unreadable Kolab part.
ERROR_MISSING_KOLAB_PART  = 1
Indicates a missing Kolab data MIME part.
SERIALIZATION_BACKENDID  = 'B'
SERIALIZATION_DATA  = 'D'
Serialization elements
SERIALIZATION_ERRORS  = 'E'
SERIALIZATION_FOLDER  = 'F'
SERIALIZATION_MIMEPARTID  = 'P'
SERIALIZATION_STRUCTURE  = 'S'
SERIALIZATION_TYPE  = 'T'
TYPE_INVALID  = 'INVALID'
Indicates an invalid object.
$_backend_id  : string
The object ID within the backend.
$_content  : resource
The content string representing the object data.
$_data  : array<string|int, mixed>
The object data.
$_driver  : Horde_Kolab_Storage_Driver
The driver for accessing the backend.
$_errors  : array<string|int, mixed>
The collection of parse errors (if any).
$_folder  : string
The folder that holds the object within the backend.
$_headers  : Horde_Mime_Headers
The MIME headers of the object envelope.
$_mime_part_id  : string
The ID of the MIME part carrying the object data.
$_structure  : Horde_Mime_Part
The message structure.
$_type  : string
The object type.
__serialize()  : array<string|int, mixed>
__unserialize()  : void
create()  : bool|string
Create a new object in the backend.
generateUid()  : string
Generate a unique object ID.
getBackendId()  : mixed
getContent()  : resource
Fetch the raw content representing the object data.
getCurrentContent()  : resource
Return the current content value representing the object data. This call does not attempt to fetch the content from the backend.
getData()  : array<string|int, mixed>
Fetch the object data.
getHeaders()  : Horde_Mime_Headers
Return the MIME headers of the object envelope.
getParseErrors()  : mixed
getType()  : string
Return the object type.
getUid()  : string
Return the UID of the object. If no UID has been set a valid UID will be autogenerated.
hasParseErrors()  : mixed
load()  : mixed
Loads the object from the backend.
offsetExists()  : mixed
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
save()  : bool|string
Store the modified object in the backend.
serialize()  : string
Serialization.
setContent()  : mixed
Set the content representing the object data.
setData()  : mixed
Set the object data.
setDriver()  : mixed
Set the driver for accessing the backend.
unserialize()  : mixed
Unserialization.
_appendMessage()  : bool|string
Append a new message.
_getDriver()  : Horde_Kolab_Storage_Driver
Return the driver for accessing the backend.
_getFolder()  : mixed
_getMimePartId()  : mixed
addParseError()  : mixed
createEnvelope()  : Horde_Mime_Part
Generates a new MIME messages that will wrap a Kolab groupware object.
createEnvelopeHeaders()  : Horde_Mime_Headers
Generate the headers for the MIME envelope of a Kolab groupware object.
createFreshKolabPart()  : Horde_Mime_Part
Embed the Kolab content into a new MIME Part.

Constants

ERROR_INVALID_KOLAB_PART

Indicates an unreadable Kolab part.

public mixed ERROR_INVALID_KOLAB_PART = 2

ERROR_MISSING_KOLAB_PART

Indicates a missing Kolab data MIME part.

public mixed ERROR_MISSING_KOLAB_PART = 1

SERIALIZATION_BACKENDID

public mixed SERIALIZATION_BACKENDID = 'B'

SERIALIZATION_DATA

Serialization elements

public mixed SERIALIZATION_DATA = 'D'

SERIALIZATION_ERRORS

public mixed SERIALIZATION_ERRORS = 'E'

SERIALIZATION_FOLDER

public mixed SERIALIZATION_FOLDER = 'F'

SERIALIZATION_MIMEPARTID

public mixed SERIALIZATION_MIMEPARTID = 'P'

SERIALIZATION_STRUCTURE

public mixed SERIALIZATION_STRUCTURE = 'S'

SERIALIZATION_TYPE

public mixed SERIALIZATION_TYPE = 'T'

TYPE_INVALID

Indicates an invalid object.

public mixed TYPE_INVALID = 'INVALID'

Properties

$_backend_id

The object ID within the backend.

protected string $_backend_id

$_content

The content string representing the object data.

protected resource $_content

$_data

The object data.

protected array<string|int, mixed> $_data = array()

$_errors

The collection of parse errors (if any).

protected array<string|int, mixed> $_errors = array()

$_folder

The folder that holds the object within the backend.

protected string $_folder

$_headers

The MIME headers of the object envelope.

protected Horde_Mime_Headers $_headers

$_mime_part_id

The ID of the MIME part carrying the object data.

protected string $_mime_part_id

$_structure

The message structure.

protected Horde_Mime_Part $_structure

$_type

The object type.

protected string $_type

Methods

__serialize()

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

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Return values
void

generateUid()

Generate a unique object ID.

public generateUid() : string
Return values
string

The unique ID.

getBackendId()

public getBackendId() : mixed
Tags
since

Horde_Kolab_Storage 2.1.0

Return values
mixed

getContent()

Fetch the raw content representing the object data.

public getContent() : resource
Return values
resource

The raw object content.

getCurrentContent()

Return the current content value representing the object data. This call does not attempt to fetch the content from the backend.

public getCurrentContent() : resource
Return values
resource

The raw object content.

getData()

Fetch the object data.

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

The object data.

getHeaders()

Return the MIME headers of the object envelope.

public getHeaders() : Horde_Mime_Headers
Return values
Horde_Mime_Headers

The MIME headers.

getParseErrors()

public getParseErrors() : mixed
Return values
mixed

getType()

Return the object type.

public getType() : string
Return values
string

The object type.

getUid()

Return the UID of the object. If no UID has been set a valid UID will be autogenerated.

public getUid() : string
Return values
string

The object UID.

hasParseErrors()

public hasParseErrors() : mixed
Return values
mixed

load()

Loads the object from the backend.

public load(string $backend_id, Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Object_Writer $data[, Horde_Mime_Part $structure = null ]) : mixed
Parameters
$backend_id : string

The object ID within the backend.

$folder : Horde_Kolab_Storage_Folder

The folder to retrieve the data object from.

$data : Horde_Kolab_Storage_Object_Writer

The data parser.

$structure : Horde_Mime_Part = null

The MIME message structure of the object.

Return values
mixed

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

serialize()

Serialization.

public serialize() : string
Return values
string

Serialized data.

setContent()

Set the content representing the object data.

public setContent(resource $content) : mixed
Parameters
$content : resource

The object content.

Return values
mixed

setData()

Set the object data.

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

The object data.

Return values
mixed

_appendMessage()

Append a new message.

protected _appendMessage(Horde_Mime_Part $message, Horde_Mime_Headers $headers) : bool|string
Parameters
$message : Horde_Mime_Part

The message.

$headers : Horde_Mime_Headers

The message headers.

Tags
throws
Horde_Kolab_Storage_Object_Exception
Return values
bool|string

The return value of the append operation.

_getFolder()

protected _getFolder() : mixed
Return values
mixed

_getMimePartId()

protected _getMimePartId() : mixed
Return values
mixed

addParseError()

protected addParseError(mixed $error[, mixed $message = '' ]) : mixed
Parameters
$error : mixed
$message : mixed = ''
Return values
mixed

createEnvelope()

Generates a new MIME messages that will wrap a Kolab groupware object.

protected createEnvelope() : Horde_Mime_Part
Return values
Horde_Mime_Part

The new MIME message.

createEnvelopeHeaders()

Generate the headers for the MIME envelope of a Kolab groupware object.

protected createEnvelopeHeaders() : Horde_Mime_Headers
Return values
Horde_Mime_Headers

The headers for the MIME envelope.

createFreshKolabPart()

Embed the Kolab content into a new MIME Part.

protected createFreshKolabPart(resource $content) : Horde_Mime_Part
Parameters
$content : resource

The Kolab content.

Return values
Horde_Mime_Part

The MIME part that encapsules the Kolab content.

Search results