PolicyGate
extends Facade
in package
Class PolicyGate.
Tags
Table of Contents
Methods
- addPolicy() : void
- addRule() : void
- check() : bool
- getModelFor() : null|string
- getPolicies() : array<string|int, mixed>
- getPolicyFor() : mixed
- getRules() : array<string|int, mixed>
- getFacadeAccessor() : string
Methods
addPolicy()
public
static addPolicy(string $model, string $policy) : void
Parameters
- $model : string
- $policy : string
addRule()
public
static addRule(string $model, string $handler) : void
Parameters
- $model : string
- $handler : string
check()
public
static check(string $type, string $ability, mixed $arguments) : bool
Parameters
- $type : string
- $ability : string
- $arguments : mixed
Return values
boolgetModelFor()
public
static getModelFor(string $policy) : null|string
Parameters
- $policy : string
Return values
null|stringgetPolicies()
public
static getPolicies() : array<string|int, mixed>
Return values
array<string|int, mixed>getPolicyFor()
public
static getPolicyFor(string $model) : mixed
Parameters
- $model : string
getRules()
public
static getRules() : array<string|int, mixed>
Return values
array<string|int, mixed>getFacadeAccessor()
protected
static getFacadeAccessor() : string