__construct()
__construct(array $data)
Constructor options: - `logger`
Parameters
array | $data | Constructor options. |
Manage ACL roles and permissions from config (arrays) or database.
loadPermissions(\Zend\Permissions\Acl\Acl $acl, array $permissions, string $resource = '') : void
\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(\Zend\Permissions\Acl\Acl $acl, \PDO $db, string $table, string $resource = '') : void
\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(\Zend\Permissions\Acl\Acl $acl, string $role, array $permissions, string $resource) : void
\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. |