Documentation

Horde_Kolab_Storage_Folder_Namespace
in package
implements IteratorAggregate, Serializable

The Horde_Kolab_Storage_Folder_Namespace:: class handles IMAP namespaces and allows to derive folder information from folder names.

Copyright 2004-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

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

Interfaces, Classes, Traits and Enums

IteratorAggregate
Serializable

Table of Contents

OTHER  = 'other'
PERSONAL  = 'personal'
The possible namespace types (RFC 2342 [5])
SHARED  = 'shared'
$user  : string
The current user.
$_any  : Horde_Kolab_Storage_Folder_Namespace_Element
The fallback namespace matching any path if no other namesace matches.
$_namespaces  : array<string|int, mixed>
The namespaces.
$_prefix_namespaces  : array<string|int, mixed>
The namespaces with a defined prefix.
__construct()  : mixed
Constructor.
__toString()  : string
Convert the namespace description to a string.
constructFolderName()  : string
Construct the Kolab storage folder name based on the folder title and the owner.
getIterator()  : Traversable
getOwner()  : string
Return the owner of a folder.
getParent()  : string
Get the parent for the given folder name.
getSubpath()  : string
Get the sub path for the given folder name.
getTitle()  : string
Return the title of a folder.
matchNamespace()  : Horde_Kolab_Storage_Folder_Namespace_Element
Match a folder name with the corresponding namespace.
setTitle()  : string
Generate an IMAP folder name in the personal namespace.
setTitleInOther()  : string
Generate an IMAP folder name in the other namespace.
setTitleInShared()  : string
Generate an IMAP folder name in the shared namespace.
initialize()  : null
Initialize the class with a set of namespace configurations.
_getNamespace()  : Horde_Kolab_Storage_Folder_Namespace_Element
Get the namespace matching the given type and (optional) prefix.

Constants

PERSONAL

The possible namespace types (RFC 2342 [5])

public mixed PERSONAL = 'personal'

Properties

$user

The current user.

protected string $user

$_namespaces

The namespaces.

private array<string|int, mixed> $_namespaces = array()

$_prefix_namespaces

The namespaces with a defined prefix.

private array<string|int, mixed> $_prefix_namespaces = array()

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed> $namespaces) : mixed
Parameters
$namespaces : array<string|int, mixed>

The namespaces.

Return values
mixed

__toString()

Convert the namespace description to a string.

public __toString() : string
Return values
string

The namespace description.

constructFolderName()

Construct the Kolab storage folder name based on the folder title and the owner.

public constructFolderName(string $owner, string $subpath[, string $prefix = null ]) : string
Parameters
$owner : string

The owner of the folder.

$subpath : string

The folder subpath.

$prefix : string = null

The namespace prefix.

Return values
string

The folder name for the backend.

getIterator()

public getIterator() : Traversable
Return values
Traversable

getOwner()

Return the owner of a folder.

public getOwner(string $name) : string
Parameters
$name : string

The name of the folder.

Return values
string

The owner of the folder.

getParent()

Get the parent for the given folder name.

public getParent(string $name) : string
Parameters
$name : string

The parent folder name.

Return values
string

The parent.

getSubpath()

Get the sub path for the given folder name.

public getSubpath(string $name) : string
Parameters
$name : string

The folder name.

Return values
string

The sub path.

getTitle()

Return the title of a folder.

public getTitle(string $name) : string
Parameters
$name : string

The name of the folder.

Return values
string

The title of the folder.

setTitle()

Generate an IMAP folder name in the personal namespace.

public setTitle(string $title) : string
Parameters
$title : string

The new folder title.

Return values
string

The IMAP folder name.

setTitleInOther()

Generate an IMAP folder name in the other namespace.

public setTitleInOther(string $title, string $owner) : string
Parameters
$title : string

The new folder title.

$owner : string

The new owner of the folder.

Return values
string

The IMAP folder name.

setTitleInShared()

Generate an IMAP folder name in the shared namespace.

public setTitleInShared(string $title) : string
Parameters
$title : string

The new folder title.

Return values
string

The IMAP folder name.

initialize()

Initialize the class with a set of namespace configurations.

protected initialize(array<string|int, mixed> $namespaces) : null
Parameters
$namespaces : array<string|int, mixed>

The namespaces.

Return values
null

Search results