1 | <?php namespace Modules\User\Permissions; |
||
5 | class PermissionManager |
||
6 | { |
||
7 | /** |
||
8 | * @var Module |
||
9 | */ |
||
10 | private $module; |
||
11 | |||
12 | /** |
||
13 | */ |
||
14 | public function __construct() |
||
18 | |||
19 | /** |
||
20 | * Get the permissions from all the enabled modules |
||
21 | * @return array |
||
22 | */ |
||
23 | public function all() |
||
35 | |||
36 | /** |
||
37 | * Return a correctly type casted permissions array |
||
38 | * @param $permissions |
||
39 | * @return array |
||
40 | */ |
||
41 | public function clean($permissions) |
||
53 | |||
54 | /** |
||
55 | * @param $checkedPermission |
||
56 | * @return bool |
||
57 | */ |
||
58 | protected function getState($checkedPermission) |
||
70 | |||
71 | /** |
||
72 | * Are all of the permissions passed of false value? |
||
73 | * @param array $permissions Permissions array |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function permissionsAreAllFalse(array $permissions) |
||
90 | } |
||
91 |