Documentation

Permission
in package

FinalYes

Table of Contents

Properties

$action  : Action
$cache  : SessionPermissionCache
$logger  : Logger
$mySql  : MySql
$resource  : Resource
$role  : Role

Methods

__construct()  : mixed
getPermissionId()  : int
grantRolePermission()  : void
grantUserPermission()  : void
revokeRolePermission()  : bool
revokeUserPermission()  : bool
ensurePermission()  : int

Properties

Methods

getPermissionId()

public getPermissionId(string $resource, string $action) : int
Parameters
$resource : string
$action : string
Tags
throws
RuntimeException
Return values
int

grantRolePermission()

public grantRolePermission(string $roleName, string $resource, string $action, bool $allow) : void
Parameters
$roleName : string
$resource : string
$action : string
$allow : bool

grantUserPermission()

public grantUserPermission(int $userId, string $resource, string $action, bool $allow) : void
Parameters
$userId : int
$resource : string
$action : string
$allow : bool

revokeRolePermission()

public revokeRolePermission(string $roleName, string $resource, string $action) : bool
Parameters
$roleName : string
$resource : string
$action : string
Return values
bool

revokeUserPermission()

public revokeUserPermission(int $userId, string $resource, string $action) : bool
Parameters
$userId : int
$resource : string
$action : string
Return values
bool

ensurePermission()

private ensurePermission(string $resource, string $action) : int
Parameters
$resource : string
$action : string
Tags
throws
RuntimeException
Return values
int

        
On this page

Search results