Constants

TYPE_INVALID

TYPE_INVALID

Indicates an invalid object.

ERROR_MISSING_KOLAB_PART

ERROR_MISSING_KOLAB_PART

Indicates a missing Kolab data MIME part.

ERROR_INVALID_KOLAB_PART

ERROR_INVALID_KOLAB_PART

Indicates an unreadable Kolab part.

SERIALIZATION_DATA

SERIALIZATION_DATA

Serialization elements

SERIALIZATION_ERRORS

SERIALIZATION_ERRORS

SERIALIZATION_TYPE

SERIALIZATION_TYPE

SERIALIZATION_STRUCTURE

SERIALIZATION_STRUCTURE

SERIALIZATION_FOLDER

SERIALIZATION_FOLDER

SERIALIZATION_BACKENDID

SERIALIZATION_BACKENDID

SERIALIZATION_MIMEPARTID

SERIALIZATION_MIMEPARTID

Properties

$_folder

$_folder : string

The folder that holds the object within the backend.

Type

string

$_backend_id

$_backend_id : string

The object ID within the backend.

Type

string

$_mime_part_id

$_mime_part_id : string

The ID of the MIME part carrying the object data.

Type

string

$_type

$_type : string

The object type.

Type

string

$_headers

$_headers : \Horde_Mime_Headers

The MIME headers of the object envelope.

Type

\Horde_Mime_Headers

$_structure

$_structure : \Horde_Mime_Part

The message structure.

Type

\Horde_Mime_Part

$_content

$_content : resource

The content string representing the object data.

Type

resource

$_data

$_data : array

The object data.

Type

array

$_errors

$_errors : array

The collection of parse errors (if any).

Type

array

Methods

setDriver()

setDriver(\Horde_Kolab_Storage_Driver  $driver) 

Set the driver for accessing the backend.

Parameters

\Horde_Kolab_Storage_Driver $driver

The driver.

getBackendId()

getBackendId() 

getType()

getType() : string

Return the object type.

Returns

string —

The object type.

getHeaders()

getHeaders() : \Horde_Mime_Headers

Return the MIME headers of the object envelope.

Returns

\Horde_Mime_Headers —

The MIME headers.

setContent()

setContent(resource  $content) 

Set the content representing the object data.

Parameters

resource $content

The object content.

getContent()

getContent() : resource

Fetch the raw content representing the object data.

Returns

resource —

The raw object content.

getCurrentContent()

getCurrentContent() : resource

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

Returns

resource —

The raw object content.

setData()

setData(array  $data) 

Set the object data.

Parameters

array $data

The object data.

getData()

getData() : array

Fetch the object data.

Returns

array —

The object data.

getUid()

getUid() : string

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

Returns

string —

The object UID.

generateUid()

generateUid() : string

Generate a unique object ID.

Returns

string —

The unique ID.

getParseErrors()

getParseErrors() 

hasParseErrors()

hasParseErrors() 

create()

create(\Horde_Kolab_Storage_Folder  $folder, \Horde_Kolab_Storage_Object_Writer  $data, string  $type) : boolean|string

Create a new object in the backend.

Parameters

\Horde_Kolab_Storage_Folder $folder

The folder to retrieve the data object from.

\Horde_Kolab_Storage_Object_Writer $data

The data writer.

string $type

The type of object to be stored.

Returns

boolean|string —

The return value of the append operation.

load()

load(string  $backend_id, \Horde_Kolab_Storage_Folder  $folder, \Horde_Kolab_Storage_Object_Writer  $data, \Horde_Mime_Part  $structure = null) 

Loads the object from the backend.

Parameters

string $backend_id

The object ID within the backend.

\Horde_Kolab_Storage_Folder $folder

The folder to retrieve the data object from.

\Horde_Kolab_Storage_Object_Writer $data

The data parser.

\Horde_Mime_Part $structure

The MIME message structure of the object.

save()

save(\Horde_Kolab_Storage_Object_Writer  $data) : boolean|string

Store the modified object in the backend.

Parameters

\Horde_Kolab_Storage_Object_Writer $data

The data writer.

Throws

\Horde_Kolab_Storage_Object_Exception

Returns

boolean|string —

The return value of the append operation.

offsetExists()

offsetExists(  $offset) 

Parameters

$offset

offsetGet()

offsetGet(  $offset) 

Parameters

$offset

offsetSet()

offsetSet(  $offset,   $value) 

Parameters

$offset
$value

offsetUnset()

offsetUnset(  $offset) 

Parameters

$offset

serialize()

serialize() : string

Serialization.

Returns

string —

Serialized data.

unserialize()

unserialize(string  $data) 

Unserialization.

Parameters

string $data

Serialized data.

Throws

\Horde_Kolab_Storage_Object_Exception

_getDriver()

_getDriver() : \Horde_Kolab_Storage_Driver

Return the driver for accessing the backend.

Returns

\Horde_Kolab_Storage_Driver

The driver.

_getFolder()

_getFolder() 

_getMimePartId()

_getMimePartId() 

addParseError()

addParseError(  $error,   $message = '') 

Parameters

$error
$message

_appendMessage()

_appendMessage(\Horde_Mime_Part  $message, \Horde_Mime_Headers  $headers) : boolean|string

Append a new message.

Parameters

\Horde_Mime_Part $message

The message.

\Horde_Mime_Headers $headers

The message headers.

Throws

\Horde_Kolab_Storage_Object_Exception

Returns

boolean|string —

The return value of the append operation.

createEnvelope()

createEnvelope() : \Horde_Mime_Part

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

Returns

\Horde_Mime_Part —

The new MIME message.

createEnvelopeHeaders()

createEnvelopeHeaders() : \Horde_Mime_Headers

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

Returns

\Horde_Mime_Headers —

The headers for the MIME envelope.

createFreshKolabPart()

createFreshKolabPart(resource  $content) : \Horde_Mime_Part

Embed the Kolab content into a new MIME Part.

Parameters

resource $content

The Kolab content.

Returns

\Horde_Mime_Part —

The MIME part that encapsules the Kolab content.