PHP Class Horde_Kolab_Storage_Object, horde

Inheritance: implements ArrayAccess, implements Serializable
Datei anzeigen Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_backend_id string The object ID within the backend.
$_content resource The content string representing the object data.
$_data array The object data.
$_driver Horde_Kolab_Storage_Driver The driver for accessing the backend.
$_errors array 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.

Public Methods

Method Description
create ( Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Object_Writer $data, string $type ) : boolean | string Create a new object in the backend.
generateUid ( ) : string Generate a unique object ID.
getBackendId ( )
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 Fetch the object data.
getHeaders ( ) : Horde_Mime_Headers Return the MIME headers of the object envelope.
getParseErrors ( )
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 ( )
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.
offsetExists ( $offset ) * ArrayAccess methods.
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
save ( Horde_Kolab_Storage_Object_Writer $data ) : boolean | string Store the modified object in the backend.
serialize ( ) : string Serialization.
setContent ( resource $content ) Set the content representing the object data.
setData ( array $data ) Set the object data.
setDriver ( Horde_Kolab_Storage_Driver $driver ) Set the driver for accessing the backend.
unserialize ( string $data ) Unserialization.

Protected Methods

Method Description
_appendMessage ( Horde_Mime_Part $message, Horde_Mime_Headers $headers ) : boolean | string Append a new message.
_getDriver ( ) : Horde_Kolab_Storage_Driver Return the driver for accessing the backend.
_getFolder ( )
_getMimePartId ( )
addParseError ( $error, $message = '' )
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 ( resource $content ) : Horde_Mime_Part Embed the Kolab content into a new MIME Part.

Method Details

_appendMessage() protected method

Append a new message.
protected _appendMessage ( Horde_Mime_Part $message, Horde_Mime_Headers $headers ) : boolean | string
$message Horde_Mime_Part The message.
$headers Horde_Mime_Headers The message headers.
return boolean | string The return value of the append operation.

_getDriver() protected method

Return the driver for accessing the backend.
protected _getDriver ( ) : Horde_Kolab_Storage_Driver
return Horde_Kolab_Storage_Driver The driver.

_getFolder() protected method

protected _getFolder ( )

_getMimePartId() protected method

protected _getMimePartId ( )

addParseError() protected method

protected addParseError ( $error, $message = '' )

create() public method

Create a new object in the backend.
public create ( Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Object_Writer $data, string $type ) : boolean | string
$folder Horde_Kolab_Storage_Folder The folder to retrieve the data object from.
$data Horde_Kolab_Storage_Object_Writer The data writer.
$type string The type of object to be stored.
return boolean | string The return value of the append operation.

createEnvelope() protected method

Generates a new MIME messages that will wrap a Kolab groupware object.
protected createEnvelope ( ) : Horde_Mime_Part
return Horde_Mime_Part The new MIME message.

createEnvelopeHeaders() protected method

Generate the headers for the MIME envelope of a Kolab groupware object.
protected createEnvelopeHeaders ( ) : Horde_Mime_Headers
return Horde_Mime_Headers The headers for the MIME envelope.

createFreshKolabPart() protected method

Embed the Kolab content into a new MIME Part.
protected createFreshKolabPart ( resource $content ) : Horde_Mime_Part
$content resource The Kolab content.
return Horde_Mime_Part The MIME part that encapsules the Kolab content.

generateUid() public method

Generate a unique object ID.
public generateUid ( ) : string
return string The unique ID.

getBackendId() public method

public getBackendId ( )

getContent() public method

Fetch the raw content representing the object data.
public getContent ( ) : resource
return resource The raw object content.

getCurrentContent() public method

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 resource The raw object content.

getData() public method

Fetch the object data.
public getData ( ) : array
return array The object data.

getHeaders() public method

Return the MIME headers of the object envelope.
public getHeaders ( ) : Horde_Mime_Headers
return Horde_Mime_Headers The MIME headers.

getParseErrors() public method

public getParseErrors ( )

getType() public method

Return the object type.
public getType ( ) : string
return string The object type.

getUid() public method

Return the UID of the object. If no UID has been set a valid UID will be autogenerated.
public getUid ( ) : string
return string The object UID.

hasParseErrors() public method

public hasParseErrors ( )

load() public method

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 )
$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 The MIME message structure of the object.

offsetExists() public method

* ArrayAccess methods.
public offsetExists ( $offset )

offsetGet() public method

public offsetGet ( $offset )

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

save() public method

Store the modified object in the backend.
public save ( Horde_Kolab_Storage_Object_Writer $data ) : boolean | string
$data Horde_Kolab_Storage_Object_Writer The data writer.
return boolean | string The return value of the append operation.

serialize() public method

Serialization.
public serialize ( ) : string
return string Serialized data.

setContent() public method

Set the content representing the object data.
public setContent ( resource $content )
$content resource The object content.

setData() public method

Set the object data.
public setData ( array $data )
$data array The object data.

setDriver() public method

Set the driver for accessing the backend.
public setDriver ( Horde_Kolab_Storage_Driver $driver )
$driver Horde_Kolab_Storage_Driver The driver.

unserialize() public method

Unserialization.
public unserialize ( string $data )
$data string Serialized data.

Property Details

$_backend_id protected_oe property

The object ID within the backend.
protected string $_backend_id
return string

$_content protected_oe property

The content string representing the object data.
protected resource $_content
return resource

$_data protected_oe property

The object data.
protected array $_data
return array

$_driver protected_oe property

The driver for accessing the backend.
protected Horde_Kolab_Storage_Driver $_driver
return Horde_Kolab_Storage_Driver

$_errors protected_oe property

The collection of parse errors (if any).
protected array $_errors
return array

$_folder protected_oe property

The folder that holds the object within the backend.
protected string $_folder
return string

$_headers protected_oe property

The MIME headers of the object envelope.
protected Horde_Mime_Headers $_headers
return Horde_Mime_Headers

$_mime_part_id protected_oe property

The ID of the MIME part carrying the object data.
protected string $_mime_part_id
return string

$_structure protected_oe property

The message structure.
protected Horde_Mime_Part $_structure
return Horde_Mime_Part

$_type protected_oe property

The object type.
protected string $_type
return string