class UserPolicy extends AbstractPolicy
Constants
GLOBAL |
|
ALLOW |
|
DENY |
|
FORCE_ALLOW |
|
FORCE_DENY |
|
Methods
string|void
from AbstractPolicy
string|void
sanitizeResult(mixed $result)
<p>Allows <code>true</code> to be used in place of <code>->allow()</code>, and <code>false</code> instead of <code>->deny()</code> This allows more concise and intuitive code, by returning boolean statements:.</p>
from AbstractPolicy
Details
in AbstractPolicy
at
line 22
protected
allow()
in AbstractPolicy
at
line 27
protected
deny()
in AbstractPolicy
at
line 32
protected
forceAllow()
in AbstractPolicy
at
line 37
protected
forceDeny()
in AbstractPolicy
at
line 48
string|void
checkAbility(User $actor, string $ability, $instance)
in AbstractPolicy
at
line 78
string|void
sanitizeResult(mixed $result)
<p>Allows <code>true</code> to be used in place of <code>->allow()</code>, and <code>false</code> instead of <code>->deny()</code> This allows more concise and intuitive code, by returning boolean statements:.</p>
<p>WITHOUT THIS: `return SOME_BOOLEAN_LOGIC ? $this->allow() : $this->deny();</p> <p>WITH THIS: `return SOME_BOOLEAN_LOGIC;</p>