\Charcoal\User\AclManager

Manage ACL roles and permissions from config (arrays) or database.

Summary

Methods
Properties
Constants
__construct()
loadPermissions()
loadDatabasePermissions()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
addRoleAndPermissions()
No private properties found
N/A

Methods

__construct()

__construct(array  $data) 

Constructor options: - `logger`

Parameters

array $data

Constructor options.

loadPermissions()

loadPermissions(\Zend\Permissions\Acl\Acl  $acl, array  $permissions, string  $resource = '') : void

Parameters

\Zend\Permissions\Acl\Acl $acl

The Zend Acl instant to load permissions to.

array $permissions

The array of permissions, in [role=>details] array.

string $resource

The Acl resource (string identifier) to load roles and permissions into.

loadDatabasePermissions()

loadDatabasePermissions(\Zend\Permissions\Acl\Acl  $acl, \PDO  $db, string  $table, string  $resource = '') : void

Parameters

\Zend\Permissions\Acl\Acl $acl

The Zend Acl instance to load permissions to.

\PDO $db

The PDO database instance.

string $table

The table where to fetch the roles and permissions.

string $resource

The Acl resource (string identifier) to load roles and permissions into.

addRoleAndPermissions()

addRoleAndPermissions(\Zend\Permissions\Acl\Acl  $acl, string  $role, array  $permissions, string  $resource) : void

Parameters

\Zend\Permissions\Acl\Acl $acl

The Zend Acl instant to add permissions to.

string $role

The role (string identifier) to add.

array $permissions

The permissions details (array) to add.

string $resource

The Acl resource (string identifier) to add roles and permissions into.