Documentation

Horde_Perms_Null extends Horde_Perms_Base
in package

Horde_Perms_Null

Copyright 2011-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
author

Jan Schneider jan@horde.org

category

Horde

Table of Contents

$_cache  : Horde_Cache
Cache object.
$_logger  : Horde_Log_Logger
Logger.
__construct()  : mixed
Constructor.
addPermission()  : mixed
Adds a permission to the permissions system. The permission must first be created with newPermission(), and have any initial users added to it, before this function is called.
exists()  : bool
Checks if a permission exists in the system.
getParents()  : array<string|int, mixed>
Returns a list of parent permissions.
getPermission()  : Horde_Perms_Permission
Returns an object corresponding to the named permission, with the users and other data retrieved appropriately.
getPermissionById()  : Horde_Perms_Permission
Returns an object corresponding to the given unique ID, with the users and other data retrieved appropriately.
getPermissionId()  : int
Returns the unique identifier of this permission.
getPermissions()  : mixed
Finds out what rights the given user has to this object.
getShortName()  : string
Returns the short name of an object, the last portion of the full name.
getTree()  : array<string|int, mixed>
Returns all permissions of the system in a tree format.
hasPermission()  : bool
Finds out if the user has the specified rights to the given object.
newPermission()  : Horde_Perms_Permission
Returns a new permissions object.
removePermission()  : mixed
Removes a permission from the permissions system permanently.

Properties

$_cache

Cache object.

protected Horde_Cache $_cache

$_logger

Logger.

protected Horde_Log_Logger $_logger

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

Configuration parameters:

'cache' - (Horde_Cache) The object to use to cache perms.
'logger' - (Horde_Log_Logger) A logger object.
Tags
throws
Horde_Perms_Exception
Return values
mixed

addPermission()

Adds a permission to the permissions system. The permission must first be created with newPermission(), and have any initial users added to it, before this function is called.

public addPermission(Horde_Perms_Permission $perm) : mixed
Parameters
$perm : Horde_Perms_Permission

The permissions object.

Tags
throws
Horde_Perms_Exception
Return values
mixed

exists()

Checks if a permission exists in the system.

public exists(string $permission) : bool
Parameters
$permission : string

The permission to check.

Return values
bool

True if the permission exists.

getParents()

Returns a list of parent permissions.

public getParents(string $child) : array<string|int, mixed>
Parameters
$child : string

The name of the child to retrieve parents for.

Tags
throws
Horde_Perms_Exception
Return values
array<string|int, mixed>

A hash with all parents in a tree format.

getPermission()

Returns an object corresponding to the named permission, with the users and other data retrieved appropriately.

public getPermission(string $name) : Horde_Perms_Permission
Parameters
$name : string

The name of the permission to retrieve.

Tags
throws
Horde_Perms_Exception
Return values
Horde_Perms_Permission

A permissions object.

getPermissionById()

Returns an object corresponding to the given unique ID, with the users and other data retrieved appropriately.

public getPermissionById(int $cid) : Horde_Perms_Permission
Parameters
$cid : int

The unique ID of the permission to retrieve.

Tags
throws
Horde_Perms_Exception
Return values
Horde_Perms_Permission

A permissions object.

getPermissions()

Finds out what rights the given user has to this object.

public getPermissions(mixed $permission, string $user[, string $creator = null ]) : mixed
Parameters
$permission : mixed

The full permission name of the object to check the permissions of, or the Horde_Permissions object.

$user : string

The user to check for.

$creator : string = null

The user who created the event.

Return values
mixed

A bitmask of permissions the user has, false if there are none.

getShortName()

Returns the short name of an object, the last portion of the full name.

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

The name of the object.

Return values
string

The object's short name.

getTree()

Returns all permissions of the system in a tree format.

public getTree() : array<string|int, mixed>
Return values
array<string|int, mixed>

A hash with all permissions in a tree format.

hasPermission()

Finds out if the user has the specified rights to the given object.

public hasPermission(string $permission, string $user, int $perm[, string $creator = null ]) : bool
Parameters
$permission : string

The permission to check.

$user : string

The user to check for.

$perm : int

The permission level that needs to be checked for.

$creator : string = null

The creator of the event

Return values
bool

Whether the user has the specified permissions.

newPermission()

Returns a new permissions object.

public newPermission(string $name[, string $type = 'matrix' ][, array<string|int, mixed> $params = null ]) : Horde_Perms_Permission
Parameters
$name : string

The permission's name.

$type : string = 'matrix'

The permission type.

$params : array<string|int, mixed> = null

The permission parameters.

Tags
throws
Horde_Perms_Exception
Return values
Horde_Perms_Permission

A new permissions object.

Search results