abstract class AbstractPolicy
Constants
| GLOBAL |
|
| ALLOW |
|
| DENY |
|
| FORCE_ALLOW |
|
| FORCE_DENY |
|
Methods
string|null
sanitizeResult(string|bool|null $result)
Allows `true` to be used in place of `->allow()`, and `false` instead of `->deny()` This allows more concise and intuitive code, by returning boolean statements:.
Details
at
line 23
protected string
allow()
at
line 28
protected string
deny()
at
line 33
protected string
forceAllow()
at
line 38
protected string
forceDeny()
at
line 73
string|null
sanitizeResult(string|bool|null $result)
Allows `true` to be used in place of `->allow()`, and `false` instead of `->deny()` This allows more concise and intuitive code, by returning boolean statements:.
WITHOUT THIS: `return SOME_BOOLEAN_LOGIC ? $this->allow() : $this->deny(); WITH THIS: `return SOME_BOOLEAN_LOGIC;