1 | <?php |
||
21 | class AuthManager extends \yii\rbac\PhpManager |
||
22 | { |
||
23 | public $itemFile = '@hipanel/rbac/files/items.php'; |
||
24 | public $ruleFile = '@hipanel/rbac/files/rules.php'; |
||
25 | public $assignmentFile = '@hipanel/rbac/files/assignments.php'; |
||
26 | |||
27 | use SetterTrait; |
||
28 | |||
29 | /** |
||
30 | * We don't keep all the assignments, only persistent. |
||
31 | * @see persistAssignments |
||
32 | */ |
||
33 | 10 | protected function saveAssignments() |
|
36 | |||
37 | /** |
||
38 | * Does real assignments saving. |
||
39 | * The idea is to split persistent assignments from session only. |
||
40 | */ |
||
41 | public function persistAssignments() |
||
42 | { |
||
43 | parent::saveAssignments(); |
||
|
|||
44 | } |
||
45 | |||
46 | 10 | public function checkAccess($userId, $permission, $params = []) |
|
63 | } |
||
64 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.