PHP Class Horde_Kolab_Storage_Folder_Base, horde

Copyright 2004-2016 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.
Author: Stuart Binge ([email protected])
Author: Gunnar Wrobel ([email protected])
Author: Thomas Jarosch ([email protected])
Inheritance: implements Horde_Kolab_Storage_Folder
Mostra file Open project: horde/horde Class Usage Examples

Public Properties

Property Type Description
$_annotation_data array Links to the annotation data handlers for this folder.
$_perms Horde_Permission_Kolab The permission handler for the folder.
$tainted boolean Indicate that the folder data has been modified from the outside and all Data handlers need to synchronize.

Public Methods

Method Description
__construct ( Horde_Kolab_Storage_List $list, string $path ) Constructor.
__construct ( Horde_Kolab_Storage_List_Query_List $list, string $path ) Constructor.
_getAnnotation ( $key ) : string | PEAR_Error Get an annotation value of this folder.
_getAnnotationData ( ) : array | PEAR_Error Get annotation values on IMAP servers that do not support METADATA.
_setAnnotation ( $key, $value ) : boolean | PEAR_Error Set an annotation value of this folder.
delete ( ) : boolean | PEAR_Error Delete this folder.
deleteMessage ( string $id, boolean $trigger = true ) : null Delete the specified message from this folder.
exists ( ) : boolean | PEAR_Error Returns whether the folder exists.
get ( string $key ) : mixed Fetch a data value.
getAttribute ( string $attribute ) : mixed Returns one of the attributes of the folder, or an empty string if it isn't defined.
getData ( $object_type = null, $data_version = 1 ) : Horde_Kolab_Storage_Data Retrieve a handler for the data in this folder.
getFbrelevance ( ) : integer Get the free/busy relevance for this folder
getFormats ( ) : array Retrieve the supported formats.
getKolabAttribute ( string $attribute ) : mixed Returns one of the Kolab attributes of the folder, or an empty string if it isn't defined.
getNamespace ( ) : string Return the namespace type of the folder.
getOwner ( ) : string Returns the owner of the folder.
getParent ( ) : string Returns the folder parent.
getPath ( ) : string Return the storage path of the folder.
getPrefix ( ) : string Return the namespace prefix of the folder.
getSubpath ( ) : string Returns the folder path without namespace components.
getTitle ( ) : string Returns a readable title for this folder.
getType ( ) : string The type of this folder.
getWithNull ( string $key ) : mixed Fetch a data value and accept a missing value (represented by the return value NULL).
getXfbaccess ( ) : array Get the extended free/busy access settings for this folder
isDefault ( ) : boolean Is this a default folder?
moveMessage ( string $id, string $folder ) : boolean Move the specified message to the specified folder.
moveMessageToShare ( string $id, string $share ) : null Move the specified message to the specified share.
parseMessage ( integer $id, string $mime_type, boolean $parse_headers = true, array $formats = ['XML'] ) : array | PEAR_Error Get an IMAP message and retrieve the Kolab Format object.
save ( array $attributes = null ) : null Saves the folder.
saveObject ( array &$object, integer $data_version, string $object_type, string $id = null, array &$old_object = null ) : boolean Save an object in this folder.
setFbrelevance ( integer $relevance ) : mixed Set the free/busy relevance for this folder
setXfbaccess ( array $access ) : mixed Set the extended free/busy access settings for this folder

Private Methods

Method Description
_init ( ) : null Fetch the data array.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Kolab_Storage_List $list, string $path )
$list Horde_Kolab_Storage_List The handler for the list of folders.
$path string Path of the folder.

__construct() public method

Constructor.
public __construct ( Horde_Kolab_Storage_List_Query_List $list, string $path )
$list Horde_Kolab_Storage_List_Query_List The query handler for the list of folders.
$path string Path of the folder.

_getAnnotation() public method

Get an annotation value of this folder.
public _getAnnotation ( $key ) : string | PEAR_Error
$key The key of the annotation to retrieve.
return string | PEAR_Error The anotation value.

_getAnnotationData() public method

Get annotation values on IMAP servers that do not support METADATA.
public _getAnnotationData ( ) : array | PEAR_Error
return array | PEAR_Error The anotations of this folder.

_setAnnotation() public method

Set an annotation value of this folder.
public _setAnnotation ( $key, $value ) : boolean | PEAR_Error
$key The key of the annotation to change.
$value The new value.
return boolean | PEAR_Error True on success.

delete() public method

Delete this folder.
public delete ( ) : boolean | PEAR_Error
return boolean | PEAR_Error True if the operation succeeded.

deleteMessage() public method

Delete the specified message from this folder.
public deleteMessage ( string $id, boolean $trigger = true ) : null
$id string IMAP id of the message to be deleted.
$trigger boolean Should the folder be triggered?
return null

exists() public method

Returns whether the folder exists.
public exists ( ) : boolean | PEAR_Error
return boolean | PEAR_Error True if the folder exists.

get() public method

Fetch a data value.
public get ( string $key ) : mixed
$key string The name of the data value to fetch.
return mixed The data value

getAttribute() public method

Returns one of the attributes of the folder, or an empty string if it isn't defined.
public getAttribute ( string $attribute ) : mixed
$attribute string The attribute to retrieve.
return mixed The value of the attribute, an empty string or an error.

getData() public method

Retrieve a handler for the data in this folder.
public getData ( $object_type = null, $data_version = 1 ) : Horde_Kolab_Storage_Data
return Horde_Kolab_Storage_Data The data handler.

getFbrelevance() public method

Get the free/busy relevance for this folder
public getFbrelevance ( ) : integer
return integer Value containing the FB_RELEVANCE.

getFormats() public method

Retrieve the supported formats.
public getFormats ( ) : array
return array The names of the supported formats.

getKolabAttribute() public method

Returns one of the Kolab attributes of the folder, or an empty string if it isn't defined.
public getKolabAttribute ( string $attribute ) : mixed
$attribute string The attribute to retrieve.
return mixed The value of the attribute, an empty string or an error.

getNamespace() public method

Return the namespace type of the folder.
public getNamespace ( ) : string
return string The namespace type of the folder.

getOwner() public method

Returns the owner of the folder.
public getOwner ( ) : string
return string The owner of this folder.

getParent() public method

Returns the folder parent.
public getParent ( ) : string
return string The parent of this folder.

getPath() public method

Return the storage path of the folder.
public getPath ( ) : string
return string The storage path of the folder.

getPrefix() public method

Return the namespace prefix of the folder.
public getPrefix ( ) : string
return string The namespace prefix of the folder.

getSubpath() public method

Returns the folder path without namespace components.
public getSubpath ( ) : string
return string The subpath of this folder.

getTitle() public method

Returns a readable title for this folder.
public getTitle ( ) : string
return string The folder title.

getType() public method

The type of this folder.
public getType ( ) : string
return string The folder type.

getWithNull() public method

Fetch a data value and accept a missing value (represented by the return value NULL).
public getWithNull ( string $key ) : mixed
$key string The name of the data value to fetch.
return mixed The data value

getXfbaccess() public method

Get the extended free/busy access settings for this folder
public getXfbaccess ( ) : array
return array Array containing the users with access to the extended information.

isDefault() public method

Is this a default folder?
public isDefault ( ) : boolean
return boolean Boolean that indicates the default status.

moveMessage() public method

Move the specified message to the specified folder.
public moveMessage ( string $id, string $folder ) : boolean
$id string IMAP id of the message to be moved.
$folder string Name of the receiving folder.
return boolean True if successful.

moveMessageToShare() public method

Move the specified message to the specified share.
public moveMessageToShare ( string $id, string $share ) : null
$id string IMAP id of the message to be moved.
$share string Name of the receiving share.
return null

parseMessage() public method

Get an IMAP message and retrieve the Kolab Format object.
public parseMessage ( integer $id, string $mime_type, boolean $parse_headers = true, array $formats = ['XML'] ) : array | PEAR_Error
$id integer The message to retrieve.
$mime_type string The mime type of the part to retrieve.
$parse_headers boolean Should the heades be Mime parsed?
$formats array The list of possible format parts.
return array | PEAR_Error An array that list the Kolab XML object text, the mime ID of the part with the XML object, the Mime parsed message and the Mime parsed headers if requested.

save() public method

Saves the folder.
public save ( array $attributes = null ) : null
$attributes array An array of folder attributes. You can set any attribute but there are a few special ones like 'type', 'default', 'owner' and 'desc'.
return null

saveObject() public method

Save an object in this folder.
public saveObject ( array &$object, integer $data_version, string $object_type, string $id = null, array &$old_object = null ) : boolean
$object array The array that holds the data of the object.
$data_version integer The format handler version.
$object_type string The type of the kolab object.
$id string The IMAP id of the old object if it existed before
$old_object array The array that holds the current data of the object.
return boolean True on success.

setFbrelevance() public method

Set the free/busy relevance for this folder
public setFbrelevance ( integer $relevance ) : mixed
$relevance integer Value containing the FB_RELEVANCE
return mixed True on success or a PEAR_Error.

setXfbaccess() public method

Set the extended free/busy access settings for this folder
public setXfbaccess ( array $access ) : mixed
$access array Array containing the users with access to the extended information.
return mixed True on success or a PEAR_Error.

Property Details

$_annotation_data public_oe property

Links to the annotation data handlers for this folder.
public array $_annotation_data
return array

$_perms public_oe property

The permission handler for the folder.
public Horde_Permission_Kolab $_perms
return Horde_Permission_Kolab

$tainted public_oe property

Indicate that the folder data has been modified from the outside and all Data handlers need to synchronize.
public bool $tainted
return boolean