PHP 인터페이스 Silber\Bouncer\Contracts\Clipboard

파일 보기 프로젝트 열기: JosephSilber/bouncer 0 사용 예제들

공개 메소드들

메소드 설명
check ( Model $authority, string $ability, Model | string | null $model = null ) : boolean Determine if the given authority has the given ability.
checkRole ( Model $authority, array | string $roles, string $boolean = 'or' ) : boolean Check if an authority has the given roles.
getAbilities ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection Get a list of the authority's abilities.
getForbiddenAbilities ( Model $authority ) : Illuminate\Database\Eloquent\Collection Get a list of the authority's forbidden abilities.
getRoles ( Model $authority ) : Collection Get the given authority's roles.
registerAt ( Illuminate\Contracts\Auth\Access\Gate $gate ) : void Register the clipboard at the given gate.

메소드 상세

check() 공개 메소드

Determine if the given authority has the given ability.
public check ( Model $authority, string $ability, Model | string | null $model = null ) : boolean
$authority Illuminate\Database\Eloquent\Model
$ability string
$model Illuminate\Database\Eloquent\Model | string | null
리턴 boolean

checkRole() 공개 메소드

Check if an authority has the given roles.
public checkRole ( Model $authority, array | string $roles, string $boolean = 'or' ) : boolean
$authority Illuminate\Database\Eloquent\Model
$roles array | string
$boolean string
리턴 boolean

getAbilities() 공개 메소드

Get a list of the authority's abilities.
public getAbilities ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
리턴 Illuminate\Database\Eloquent\Collection

getForbiddenAbilities() 공개 메소드

Get a list of the authority's forbidden abilities.
public getForbiddenAbilities ( Model $authority ) : Illuminate\Database\Eloquent\Collection
$authority Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Collection

getRoles() 공개 메소드

Get the given authority's roles.
public getRoles ( Model $authority ) : Collection
$authority Illuminate\Database\Eloquent\Model
리턴 Illuminate\Support\Collection

registerAt() 공개 메소드

Register the clipboard at the given gate.
public registerAt ( Illuminate\Contracts\Auth\Access\Gate $gate ) : void
$gate Illuminate\Contracts\Auth\Access\Gate
리턴 void