PHP Интерфейс Silber\Bouncer\Contracts\Clipboard

Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
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