Documentation

Role
in package

FinalYes

Table of Contents

Properties

$cache  : SessionPermissionCache
$logger  : Logger
$mySql  : MySql

Methods

__construct()  : mixed
addInheritance()  : void
assignRoleToUser()  : void
create()  : int
delete()  : void
getAll()  : array<string|int, mixed>
getRoleId()  : int
getUserRoles()  : array<string|int, mixed>
removeInheritance()  : void
removeUserRole()  : bool
userHasRole()  : bool

Properties

Methods

addInheritance()

public addInheritance(string $child, string $parent) : void
Parameters
$child : string
$parent : string
Tags
throws
RuntimeException

assignRoleToUser()

public assignRoleToUser(int $userId, string $roleName) : void
Parameters
$userId : int
$roleName : string
Tags
throws
RuntimeException
throws
Throwable

create()

public create(string $roleName, string $roleDescription) : int
Parameters
$roleName : string
$roleDescription : string
Tags
throws
RuntimeException
throws
Throwable
Return values
int

delete()

public delete(string $roleName) : void
Parameters
$roleName : string
Tags
throws
RuntimeException

getAll()

public getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRoleId()

public getRoleId(string $roleName) : int
Parameters
$roleName : string
Tags
throws
RuntimeException
Return values
int

getUserRoles()

public getUserRoles(int $userId) : array<string|int, mixed>
Parameters
$userId : int
Return values
array<string|int, mixed>

removeInheritance()

public removeInheritance(string $child, string $parent) : void
Parameters
$child : string
$parent : string

removeUserRole()

public removeUserRole(int $userId, string $role) : bool
Parameters
$userId : int
$role : string
Return values
bool

userHasRole()

public userHasRole(int $userId, string $roleName) : bool
Parameters
$userId : int
$roleName : string
Return values
bool

        
On this page

Search results