PHP Класс Silber\Bouncer\Database\Queries\Abilities

Показать файл Открыть проект

Открытые методы

Метод Описание
getForAuthority ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection Get a list of the authority's abilities.

Защищенные методы

Метод Описание
addRoleInheritCondition ( Builder $query, Model $authority, string $roles ) : Closure Add the role inheritence "where" clause to the given query.
getAuthorityConstraint ( Model $authority, boolean $allowed ) : Closure Get a constraint for abilities that have been granted to the given authority.
getAuthorityRoleConstraint ( Model $authority ) : Closure Get a constraint for roles that are assigned to the given authority.
getRoleConstraint ( Model $authority, boolean $allowed ) : Closure Get a constraint for abilities that have been granted to the given authority through a role.

Описание методов

addRoleInheritCondition() защищенный Метод

Add the role inheritence "where" clause to the given query.
protected addRoleInheritCondition ( Builder $query, Model $authority, string $roles ) : Closure
$query Illuminate\Database\Query\Builder
$authority Illuminate\Database\Eloquent\Model
$roles string
Результат Closure

getAuthorityConstraint() защищенный Метод

Get a constraint for abilities that have been granted to the given authority.
protected getAuthorityConstraint ( Model $authority, boolean $allowed ) : Closure
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
Результат Closure

getAuthorityRoleConstraint() защищенный Метод

Get a constraint for roles that are assigned to the given authority.
protected getAuthorityRoleConstraint ( Model $authority ) : Closure
$authority Illuminate\Database\Eloquent\Model
Результат Closure

getForAuthority() публичный Метод

Get a list of the authority's abilities.
public getForAuthority ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
Результат Illuminate\Database\Eloquent\Collection

getRoleConstraint() защищенный Метод

Get a constraint for abilities that have been granted to the given authority through a role.
protected getRoleConstraint ( Model $authority, boolean $allowed ) : Closure
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
Результат Closure