| 1 | <?php /** MicroFileRBAC */ |
||
| 21 | class FileRbac extends Rbac |
||
|
|
|||
| 22 | { |
||
| 23 | /** @var array $roles RBAC role tree */ |
||
| 24 | private $roles = []; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * Redefine constructor for RBAC |
||
| 29 | * |
||
| 30 | * @access public |
||
| 31 | * |
||
| 32 | * @param Adapter $connection |
||
| 33 | * |
||
| 34 | * @result void |
||
| 35 | */ |
||
| 36 | public function __construct(Adapter $connection) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Assign RBAC element into user |
||
| 47 | * |
||
| 48 | * @access public |
||
| 49 | * |
||
| 50 | * @param integer $userId user id |
||
| 51 | * @param string $name element name |
||
| 52 | * |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | public function assign($userId, $name) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Get raw roles |
||
| 69 | * |
||
| 70 | * @access public |
||
| 71 | * @return mixed |
||
| 72 | */ |
||
| 73 | public function rawRoles() |
||
| 77 | } |
||
| 78 |