PHP Class Horde_Kolab_Storage_Folder_Namespace_Element, horde

Copyright 2010-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.
Mostra file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_delimiter string The delimiter used for this namespace.
$_name string The prefix identifying this namespace.
$_user string The current user.

Public Methods

Method Description
__construct ( string $name, string $delimiter, string $user ) Constructor.
__toString ( ) : string Convert the namespace description to a string.
generateName ( array $path ) : string Generate a folder path for the given path in this namespace.
generatePath ( string $subpath, string $owner ) : string Generate a folder path for the given subpath and owner.
getDelimiter ( ) : string Return the delimiter for this namespace.
getName ( ) : string Return the name of this namespace.
getOwner ( string $name ) : string | boolean 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.
getType ( ) : string Return the type of this namespace (personal, other, or shared).
matches ( string $name ) : boolean Does the folder name lie in this namespace?

Protected Methods

Method Description
_subpath ( string $name ) : array Return an array describing the path elements of the folder.

Method Details

__construct() public method

Constructor.
public __construct ( string $name, string $delimiter, string $user )
$name string The prefix identifying this namespace.
$delimiter string The delimiter used for this namespace.
$user string The current user.

__toString() public method

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

_subpath() protected method

Return an array describing the path elements of the folder.
protected _subpath ( string $name ) : array
$name string The name of the folder.
return array The path elements.

generateName() public method

Generate a folder path for the given path in this namespace.
public generateName ( array $path ) : string
$path array The path of the folder.
return string The name of the folder.

generatePath() public method

Generate a folder path for the given subpath and owner.
public generatePath ( string $subpath, string $owner ) : string
$subpath string The subpath of the folder.
$owner string The folder owner.
return string The name of the folder.

getDelimiter() public method

Return the delimiter for this namespace.
public getDelimiter ( ) : string
return string The delimiter.

getName() public method

Return the name of this namespace.
public getName ( ) : string
return string The name/prefix.

getOwner() abstract public method

Return the owner of a folder.
abstract public getOwner ( string $name ) : string | boolean
$name string The name of the folder.
return string | boolean 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.

getType() abstract public method

Return the type of this namespace (personal, other, or shared).
abstract public getType ( ) : string
return string The type.

matches() public method

Does the folder name lie in this namespace?
public matches ( string $name ) : boolean
$name string The name of the folder.
return boolean True if the folder is element of this namespace.

Property Details

$_delimiter protected_oe property

The delimiter used for this namespace.
protected string $_delimiter
return string

$_name protected_oe property

The prefix identifying this namespace.
protected string $_name
return string

$_user protected_oe property

The current user.
protected string $_user
return string