abstract class AbstractPolicy
Constants
GLOBAL |
|
ALLOW |
|
DENY |
|
FORCE_ALLOW |
|
FORCE_DENY |
|
Methods
string|null
sanitizeResult(string|bool|null $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>
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)
<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>