Conditions | 7 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | public function can($permissionName, $params = [], $allowCaching = true) |
||
33 | { |
||
34 | if ($allowCaching && empty($params) && isset($this->_access[$permissionName])) { |
||
35 | return $this->_access[$permissionName]; |
||
36 | } |
||
37 | if (($accessChecker = $this->getAccessChecker()) === null) { |
||
38 | return false; |
||
39 | } |
||
40 | $access = $accessChecker->checkAccess($this->getGuid(), $permissionName, $params); |
||
41 | if ($allowCaching && empty($params)) { |
||
42 | $this->_access[$permissionName] = $access; |
||
43 | } |
||
44 | |||
45 | return $access; |
||
46 | } |
||
47 | } |