PHP Class Horde_Kolab_Storage_Folder_Namespace, 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.
Inheritance: implements IteratorAggregate, implements Serializable
Mostrar archivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$user string The current user.

Public Methods

Method Description
__construct ( array $namespaces ) Constructor.
__toString ( ) : string Convert the namespace description to a string.
constructFolderName ( string $owner, string $subpath, string $prefix = null ) : string Construct the Kolab storage folder name based on the folder title and the owner.
getIterator ( )
getOwner ( string $name ) : string Return the owner of a folder.
getParent ( string $name ) : string Get the parent for the given folder name.
getSubpath ( string $name ) : string Get the sub path for the given folder name.
getTitle ( string $name ) : string Return the title of a folder.
matchNamespace ( string $name ) : Horde_Kolab_Storage_Folder_Namespace_Element Match a folder name with the corresponding namespace.
setTitle ( string $title ) : string Generate an IMAP folder name in the personal namespace.
setTitleInOther ( string $title, string $owner ) : string Generate an IMAP folder name in the other namespace.
setTitleInShared ( string $title ) : string Generate an IMAP folder name in the shared namespace.

Protected Methods

Method Description
initialize ( array $namespaces ) : null Initialize the class with a set of namespace configurations.

Private Methods

Method Description
_getNamespace ( string $type, string $prefix = null ) : Horde_Kolab_Storage_Folder_Namespace_Element Get the namespace matching the given type and (optional) prefix.

Method Details

__construct() public method

Constructor.
public __construct ( array $namespaces )
$namespaces array The namespaces.

__toString() public method

Convert the namespace description to a string.
public __toString ( ) : string
return string The namespace description.

constructFolderName() public method

Construct the Kolab storage folder name based on the folder title and the owner.
public constructFolderName ( string $owner, string $subpath, string $prefix = null ) : string
$owner string The owner of the folder.
$subpath string The folder subpath.
$prefix string The namespace prefix.
return string The folder name for the backend.

getIterator() public method

public getIterator ( )

getOwner() public method

Return the owner of a folder.
public getOwner ( string $name ) : string
$name string The name of the folder.
return string The owner of the folder.

getParent() public method

Get the parent for the given folder name.
public getParent ( string $name ) : string
$name string The parent folder name.
return string The parent.

getSubpath() public method

Get the sub path for the given folder name.
public getSubpath ( string $name ) : string
$name string The folder name.
return string The sub path.

getTitle() public method

Return the title of a folder.
public getTitle ( string $name ) : string
$name string The name of the folder.
return string The title of the folder.

initialize() protected method

Initialize the class with a set of namespace configurations.
protected initialize ( array $namespaces ) : null
$namespaces array The namespaces.
return null

matchNamespace() public method

Match a folder name with the corresponding namespace.
public matchNamespace ( string $name ) : Horde_Kolab_Storage_Folder_Namespace_Element
$name string The name of the folder.
return Horde_Kolab_Storage_Folder_Namespace_Element The corresponding namespace.

setTitle() public method

Generate an IMAP folder name in the personal namespace.
public setTitle ( string $title ) : string
$title string The new folder title.
return string The IMAP folder name.

setTitleInOther() public method

Generate an IMAP folder name in the other namespace.
public setTitleInOther ( string $title, string $owner ) : string
$title string The new folder title.
$owner string The new owner of the folder.
return string The IMAP folder name.

setTitleInShared() public method

Generate an IMAP folder name in the shared namespace.
public setTitleInShared ( string $title ) : string
$title string The new folder title.
return string The IMAP folder name.

Property Details

$user protected_oe property

The current user.
protected string $user
return string