PHP 클래스 Silber\Bouncer\Database\Queries\Abilities

파일 보기 프로젝트 열기: JosephSilber/bouncer

공개 메소드들

메소드 설명
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