Overview

Packages

  • Kolab
    • Storage

Classes

  • Horde_Kolab_Storage_Base
  • Horde_Kolab_Storage_Cache
  • Horde_Kolab_Storage_Cache_Data
  • Horde_Kolab_Storage_Cache_List
  • Horde_Kolab_Storage_Cached
  • Horde_Kolab_Storage_Data_Base
  • Horde_Kolab_Storage_Data_Cached
  • Horde_Kolab_Storage_Data_Decorator_Log
  • Horde_Kolab_Storage_Data_Format_Mime
  • Horde_Kolab_Storage_Data_Modifiable
  • Horde_Kolab_Storage_Data_Old
  • Horde_Kolab_Storage_Data_Parser_Structure
  • Horde_Kolab_Storage_Data_Query_History_Base
  • Horde_Kolab_Storage_Data_Query_History_Cache
  • Horde_Kolab_Storage_Data_Query_Preferences_Base
  • Horde_Kolab_Storage_Data_Query_Preferences_Cache
  • Horde_Kolab_Storage_Decorator_Synchronization
  • Horde_Kolab_Storage_Driver_Base
  • Horde_Kolab_Storage_Driver_Cclient
  • Horde_Kolab_Storage_Driver_Decorator_Base
  • Horde_Kolab_Storage_Driver_Decorator_Log
  • Horde_Kolab_Storage_Driver_Decorator_Timer
  • Horde_Kolab_Storage_Driver_Imap
  • Horde_Kolab_Storage_Driver_Mock
  • Horde_Kolab_Storage_Driver_Mock_Data
  • Horde_Kolab_Storage_Driver_Pear
  • Horde_Kolab_Storage_Driver_Rcube
  • Horde_Kolab_Storage_Exception
  • Horde_Kolab_Storage_Exception_Pear
  • Horde_Kolab_Storage_Factory
  • Horde_Kolab_Storage_Folder_Base
  • Horde_Kolab_Storage_Folder_Decorator_Base
  • Horde_Kolab_Storage_Folder_Decorator_Trigger
  • Horde_Kolab_Storage_Folder_Namespace
  • Horde_Kolab_Storage_Folder_Namespace_Config
  • Horde_Kolab_Storage_Folder_Namespace_Element
  • Horde_Kolab_Storage_Folder_Namespace_Element_Other
  • Horde_Kolab_Storage_Folder_Namespace_Element_Personal
  • Horde_Kolab_Storage_Folder_Namespace_Element_Shared
  • Horde_Kolab_Storage_Folder_Namespace_Element_SharedWithPrefix
  • Horde_Kolab_Storage_Folder_Namespace_Fixed
  • Horde_Kolab_Storage_Folder_Namespace_Imap
  • Horde_Kolab_Storage_Folder_Stamp_Uids
  • Horde_Kolab_Storage_Folder_Type
  • Horde_Kolab_Storage_List_Base
  • Horde_Kolab_Storage_List_Decorator_Cache
  • Horde_Kolab_Storage_List_Decorator_Log
  • Horde_Kolab_Storage_List_Query_Acl_Base
  • Horde_Kolab_Storage_List_Query_Acl_Cache
  • Horde_Kolab_Storage_List_Query_ActiveSync_Base
  • Horde_Kolab_Storage_List_Query_ActiveSync_Cache
  • Horde_Kolab_Storage_List_Query_List_Base
  • Horde_Kolab_Storage_List_Query_List_Cache
  • Horde_Kolab_Storage_List_Query_Share_Base
  • Horde_Kolab_Storage_List_Query_Share_Cache
  • Horde_Kolab_Storage_QuerySet_Base
  • Horde_Kolab_Storage_QuerySet_Cached
  • Horde_Kolab_Storage_QuerySet_Uncached
  • Horde_Kolab_Storage_Synchronization
  • Horde_Kolab_Storage_Translation
  • Horde_Kolab_Storage_Uncached

Interfaces

  • Horde_Kolab_Storage
  • Horde_Kolab_Storage_Data
  • Horde_Kolab_Storage_Data_Format
  • Horde_Kolab_Storage_Data_Parser
  • Horde_Kolab_Storage_Data_Query
  • Horde_Kolab_Storage_Data_Query_History
  • Horde_Kolab_Storage_Data_Query_Preferences
  • Horde_Kolab_Storage_Driver
  • Horde_Kolab_Storage_Folder
  • Horde_Kolab_Storage_Folder_Stamp
  • Horde_Kolab_Storage_List
  • Horde_Kolab_Storage_List_Query
  • Horde_Kolab_Storage_List_Query_Acl
  • Horde_Kolab_Storage_List_Query_ActiveSync
  • Horde_Kolab_Storage_List_Query_List
  • Horde_Kolab_Storage_List_Query_Share
  • Horde_Kolab_Storage_Queriable
  • Horde_Kolab_Storage_Query
  • Horde_Kolab_Storage_QuerySet
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Kolab_Storage_Data_Base

The basic handler for data objects in a Kolab storage folder.

Copyright 2011-2012 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.

Horde_Kolab_Storage_Data_Base implements Horde_Kolab_Storage_Data, Horde_Kolab_Storage_Data_Query

Direct known subclasses

Horde_Kolab_Storage_Data_Cached
Package: Kolab\Storage
Category: Kolab
License: LGPL 2.1
Author: Gunnar Wrobel wrobel@pardus.de
Link: http://pear.horde.org/index.php?package=Kolab_Storage
Located at Horde/Kolab/Storage/Data/Base.php
Methods summary
public
# __construct( Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, string $type = null, integer $version = 1 )

Constructor.

Constructor.

Parameters

$folder
<p>The folder to retrieve the data from.</p>
$driver
The primary connection driver.
$factory
The factory.
$type
<p>The type of data we want to access in the folder.</p>
$version
<p>Format version of the object data.</p>
public string
# getPath( )

Return the folder path for this data handler.

Return the folder path for this data handler.

Returns

string
The folder path.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getPath()
public string
# getAuth( )

Return the ID of the current user.

Return the ID of the current user.

Returns

string
The current user.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getAuth()
public string
# getId( )

Return the ID of this data handler.

Return the ID of this data handler.

Returns

string
The ID.

Implementation of

Horde_Kolab_Storage_Data::getId()
public array
# getIdParameters( )

Return the ID parameters for this data handler.

Return the ID parameters for this data handler.

Returns

array
The ID parameters.

Implementation of

Horde_Kolab_Storage_Data::getIdParameters()
public string
# getType( )

Return the data type represented by this object.

Return the data type represented by this object.

Returns

string
The type of data this instance handles.

Implementation of

Horde_Kolab_Storage_Data::getType()
public string
# getVersion( )

Return the data version.

Return the data version.

Returns

string
The data version.

Implementation of

Horde_Kolab_Storage_Data::getVersion()
public Horde_Kolab_Storage_Folder_Stamp
# getStamp( )

Report the status of this folder.

Report the status of this folder.

Returns

Horde_Kolab_Storage_Folder_Stamp

The stamp that can be used for detecting folder changes.

Implementation of

Horde_Kolab_Storage_Data::getStamp()
public string
# create( array & $object, boolean $raw = false )

Create a new object.

Create a new object.

Parameters

$object
$object The array that holds the object data.
$raw
<p>True if the data to be stored has been provided in raw format.</p>

Returns

string

The ID of the new object or true in case the backend does not support this return value.

Throws

Horde_Kolab_Storage_Exception

In case an error occured while saving the data.

Implementation of

Horde_Kolab_Storage_Data::create()
public string
# modify( array $object, boolean $raw = false )

Modify an existing object.

Modify an existing object.

Parameters

$object
The array that holds the updated object data.
$raw
<p>True if the data to be stored has been provided in raw format.</p>

Returns

string

The new backend ID of the modified object or true in case the backend does not support this return value.

Throws

Horde_Kolab_Storage_Exception

In case an error occured while saving the data.

Implementation of

Horde_Kolab_Storage_Data::modify()
public array
# fetchComplete( string $uid )

Retrieves the complete message for the given UID.

Retrieves the complete message for the given UID.

Parameters

$uid
The message UID.

Returns

array

The message encapsuled as an array that contains a Horde_Mime_Headers and a Horde_Mime_Part object.

Implementation of

Horde_Kolab_Storage_Data::fetchComplete()
public resource
# fetchPart( string $uid, string $id )

Retrieves the body part for the given UID and mime part ID.

Retrieves the body part for the given UID and mime part ID.

Parameters

$uid
The message UID.
$id
The mime part ID.

Returns

resource
The message part as stream resource.
public array
# fetch( array $uids, boolean $raw = false )

Retrieves the objects for the given UIDs.

Retrieves the objects for the given UIDs.

Parameters

$uids
The message UIDs.
$raw
<p>True if the raw format should be returned rather than the parsed data.</p>

Returns

array
An array of objects.

Implementation of

Horde_Kolab_Storage_Data::fetch()
public string
# getBackendId( string $object_id )

Return the backend ID for the given object ID.

Return the backend ID for the given object ID.

Parameters

$object_id
$object_uid The object ID.

Returns

string
The backend ID for the object.

Implementation of

Horde_Kolab_Storage_Data::getBackendId()
public string
# generateUid( )

Generate a unique object ID.

Generate a unique object ID.

Returns

string
The unique ID.

Implementation of

Horde_Kolab_Storage_Data::generateUid()
public boolean
# objectIdExists( string $object_id )

Check if the given object ID exists.

Check if the given object ID exists.

Parameters

$object_id
The object ID.

Returns

boolean
True if the ID was found, false otherwise.

Implementation of

Horde_Kolab_Storage_Data::objectIdExists()
public array
# getObject( string $object_id )

Return the specified object.

Return the specified object.

Parameters

$object_id
The object id.

Returns

array
The object data as an array.

Implementation of

Horde_Kolab_Storage_Data::getObject()
public resource
# getAttachment( string $attachment_id )

Return the specified attachment.

Return the specified attachment.

Parameters

$attachment_id
The attachment id.

Returns

resource
An open stream to the attachment data.

Implementation of

Horde_Kolab_Storage_Data::getAttachment()
public array
# getObjectIds( )

Retrieve all object ids in the current folder.

Retrieve all object ids in the current folder.

Returns

array
The object ids.

Implementation of

Horde_Kolab_Storage_Data::getObjectIds()
public array
# getObjects( )

Retrieve all objects in the current folder.

Retrieve all objects in the current folder.

Returns

array
An array of all objects.

Implementation of

Horde_Kolab_Storage_Data::getObjects()
public array
# getObjectsByBackendId( )

Retrieve all objects in the current folder by backend id.

Retrieve all objects in the current folder by backend id.

Returns

array
An array of all objects.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getObjectsByBackendId()
public array
# getObjectByBackendId( string $uid )

Retrieve an object in the current folder by backend id.

Retrieve an object in the current folder by backend id.

Parameters

$uid
Backend id of the object to be returned.

Returns

array
An array of all objects.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getObjectByBackendId()
public array
# getObjectToBackend( )

Return the mapping of object IDs to backend IDs.

Return the mapping of object IDs to backend IDs.

Returns

array
The object to backend mapping.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getObjectToBackend()
public array
# getDuplicates( )

Retrieve the list of object duplicates.

Retrieve the list of object duplicates.

Returns

array
The list of duplicates.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getDuplicates()
public array
# getErrors( )

Retrieve the list of object errors.

Retrieve the list of object errors.

Returns

array
The list of errors.

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::getErrors()
public null
# move( string $object_id, string $new_folder )

Move the specified message from the current folder into a new folder.

Move the specified message from the current folder into a new folder.

Parameters

$object_id
ID of the message to be moved.
$new_folder
Target folder.

Returns

null

Implementation of

Horde_Kolab_Storage_Data::move()
public null
# delete( array|string $object_ids )

Delete the specified objects from this data set.

Delete the specified objects from this data set.

Parameters

$object_ids
Id(s) of the object to be deleted.

Returns

null

Implementation of

Horde_Kolab_Storage_Data::delete()
public null
# deleteAll( )

Delete all objects from this data set.

Delete all objects from this data set.

Returns

null

Implementation of

Horde_Kolab_Storage_Data::deleteAll()
public null
# deleteBackendIds( array|string $uids )

Delete the specified messages from this folder.

Delete the specified messages from this folder.

Parameters

$uids
Backend id(s) of the message to be deleted.

Returns

null

Since

Horde_Kolab_Storage 1.1.0

Implementation of

Horde_Kolab_Storage_Data::deleteBackendIds()
public null
# registerQuery( string $name, Horde_Kolab_Storage_Query $query )

Register a query to be updated if the underlying data changes.

Register a query to be updated if the underlying data changes.

Parameters

$name
The query name.
$query
The query to register.

Returns

null

Implementation of

Horde_Kolab_Storage_Queriable::registerQuery()
public null
# synchronize( array $params = array() )

Synchronize the data information with the information from the backend.

Synchronize the data information with the information from the backend.

Parameters

$params
Additional parameters.

Returns

null

Implementation of

Horde_Kolab_Storage_Query::synchronize()
public Horde_Kolab_Storage_Query
# getQuery( string $name = null )

Return a registered query.

Return a registered query.

Parameters

$name
The query name.

Returns

Horde_Kolab_Storage_Query
The requested query.

Throws

Horde_Kolab_Storage_Exception

In case the requested query does not exist.

Implementation of

Horde_Kolab_Storage_Queriable::getQuery()
Constants inherited from Horde_Kolab_Storage_Data
QUERY_HISTORY, QUERY_PREFS
API documentation generated by ApiGen