This is the generic Roles class

It loads the ACL in two stages when there is no db present, otherwise it just loads from the db:

  1. $this->loadDefaultRoles()
  2. $this->loadDefaultPrivileges() Normally you should not touch this to make upgrading easier
package Gems
subpackage Roles
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.0

 Methods

Pass any strange call to \MUtil_Acl

__call(\stringethod $method, mixed $args) : mixed

Parameters

$method

\stringethod

$args

mixed

Returns

mixed

__construct()

__construct(mixed $cache = null

Parameters

$cache

mixed

\Zend_Cache_Core or \GemsEscort

Maak een nieuwe ACL aan, omdat de cache verlopen is, of omdat de acl gewijzigd is.

build() : void

getAcl()

getAcl() : \MUtil_Acl

Returns

\MUtil_Acl

Static acces function

getInstance() : \Gems_Roles
Static

Returns

\Gems_Roles

Load the ACL values either from the cache or from build()

load() 

Load access control list from db

loadDbAcl() 

Exceptions

\Exception

loadDefaultPrivileges()

loadDefaultPrivileges() 

loadDefaultRoles()

loadDefaultRoles() 

setCache()

setCache(mixed $cache) 

Parameters

$cache

mixed

Translate all string role id's to numeric role ids

translateToRoleIds(mixed $roles) : array

Parameters

$roles

mixed

string or array

Returns

arrayOf role id's

Translate all numeric role id's to string names

translateToRoleNames(mixed $roles) : array

Parameters

$roles

mixed

string or array

Returns

array

Empty this cache instance

_deleteCache() 

Recursively expands roles into \Zend_Acl_Role objects

_expandRole(array $roleList, string $roleName, $depth = 0

Parameters

$roleList

array

$roleName

string

$depth

Reset de ACL en bouw opnieuw op

_initAcl() 

Save to cache

_save() 

Exceptions

\Gems_Exception

 Properties

 

$_acl

$_acl : \MUtil_Acl

Default

 

$_cache

$_cache : \Zend_Cache_Core

Default

null
 

The id used in the cache

$_cacheid : string

Default

'gems_acl'
 

$_instanceOfSelf

$_instanceOfSelf : \Gems_Roles

Default

Static
 

Needed for being able to store role id's instead of role names in the db

$_roleTranslations : array

Default

array()