| 1 | <?php |
||
| 7 | class AclAuthComponent extends AuthComponent |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Takes a list of actions in the current controller for which authentication is not required, or |
||
| 12 | * no parameters to allow all actions. |
||
| 13 | * |
||
| 14 | * You can use allow with either an array or a simple string. |
||
| 15 | * |
||
| 16 | * `$this->Auth->allow('view');` |
||
| 17 | * `$this->Auth->allow(['edit', 'add']);` |
||
| 18 | * `$this->Auth->allow();` to allow all actions |
||
| 19 | * |
||
| 20 | * @param string|array $actions Controller action name or array of actions. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function allow($actions = null) |
||
| 42 | } |
||
| 43 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: