1 | <?php namespace Modules\Core\Permissions; |
||
3 | class PermissionManager |
||
4 | { |
||
5 | /** |
||
6 | * @var Module |
||
7 | */ |
||
8 | private $module; |
||
9 | |||
10 | /** |
||
11 | */ |
||
12 | public function __construct() |
||
16 | |||
17 | /** |
||
18 | * Get the permissions from all the enabled modules |
||
19 | * @return array |
||
20 | */ |
||
21 | public function all() |
||
33 | |||
34 | /** |
||
35 | * Return a correctly type casted permissions array |
||
36 | * @param $permissions |
||
37 | * @return array |
||
38 | */ |
||
39 | public function clean($permissions) |
||
51 | |||
52 | /** |
||
53 | * @param $checkedPermission |
||
54 | * @return bool |
||
55 | */ |
||
56 | protected function getState($checkedPermission) |
||
68 | |||
69 | /** |
||
70 | * Are all of the permissions passed of false value? |
||
71 | * @param array $permissions Permissions array |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function permissionsAreAllFalse(array $permissions) |
||
88 | } |
||
89 |