| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 84.62% |
| Changes | 3 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 18 | trait AclControllerTrait { |
||
| 19 | public abstract function _getRole(); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Returns True if access to the controller is allowed for $role. |
||
| 23 | * |
||
| 24 | * @param string $action |
||
| 25 | * @param string $role |
||
| 26 | * @return boolean |
||
| 27 | */ |
||
| 28 | 1 | protected function isValidRole($action,$role) { |
|
| 45 | } |
||
| 46 | /** |
||
| 47 | * Returns True if access to the controller is allowed for the role returned by _getRole method. |
||
| 48 | * To be override in sub classes |
||
| 49 | * |
||
| 50 | * @param string $action |
||
| 51 | * @return boolean |
||
| 52 | */ |
||
| 53 | 1 | public function isValid($action) { |
|
| 58 |