library rbac
A leightweight Rbac implementation
rampage-php/rbac
A leightweight Rbac implementation
- Thursday, November 13, 2014
- by tux-rampage
- Repository
- 1 Watchers
- 0 Stars
- 20 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Rampage Rbac
This is a leightweight Rbac implementation.
It exists due to the ZF2 rbac implementation has some major design flaws., (*1)
Installation
Add a require statement to your composer.json composer.phar require rampage-php/rbac
., (*2)
Usage (brief)
A simple suage example, (*3)
// let rbac instanciate standard roles
$rbac = new rampage\rbac\Rbac();
$rbac->addRole('foo');
$rbac->addRole('bar', ['foo']);
$rbac->getRole('foo')->allow('permission');
// instanciate your own roles (they need to implement rampage\rbac\RoleInterface)
$role = new Role('baz')
$role->addChild('bar'); // will utilize $rbac->getRole('bar') if present.
$rbac->addRole($role);
dev-master
9999999-dev
A leightweight Rbac implementation
Sources
Download
GPL-3.0+
The Requires
The Development Requires
rbac
1.0.1
1.0.1.0
A leightweight Rbac implementation
Sources
Download
GPL-3.0+
The Requires
The Development Requires
rbac
1.0.0
1.0.0.0
A leightweight Rbac implementation
Sources
Download
GPL-3.0+
The Requires
The Development Requires
rbac