1 | <?php |
||
29 | class Handler |
||
30 | { |
||
31 | |||
32 | /** |
||
33 | * ... |
||
34 | * |
||
35 | * @param string $plugin ... |
||
36 | * @param mixed $permission ... |
||
37 | * @param mixed $group ... |
||
38 | * |
||
39 | * @return mixed ... |
||
40 | */ |
||
41 | public function getValueGroup($plugin, $permission, $group) |
||
50 | |||
51 | /** |
||
52 | * ... |
||
53 | * |
||
54 | * @param mixed $permission ... |
||
55 | * @param int $userID ... |
||
56 | * |
||
57 | * @return mixed ... |
||
58 | */ |
||
59 | public function getValueUser($permission, $userID) |
||
72 | |||
73 | /** |
||
74 | * Updates the plugin |
||
75 | * |
||
76 | * @param string $plugin the name of the plugin |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function updatePlugin($plugin) |
||
95 | |||
96 | |||
97 | /** |
||
98 | * Sets the data of a value group. The value group must exist. |
||
99 | * |
||
100 | * @param string $plugin the name of the plugin |
||
101 | * @param string $permission ... |
||
102 | * @param mixed $value ... |
||
103 | * @param int $groupID ... |
||
104 | * |
||
105 | * @return bool true if the group exists and was successfully set |
||
106 | */ |
||
|
|||
107 | |||
108 | private function _setValueGroup($plugin, $permission, $value, $groupID) |
||
134 | |||
135 | /** |
||
136 | * Sets the value for a user. |
||
137 | * |
||
138 | * @param mixed $permission ... |
||
139 | * @param int $userID ... |
||
140 | * |
||
141 | * @return true if the permission was set successfully |
||
142 | */ |
||
143 | /* |
||
144 | private function _setValueUser($permission, $userID) |
||
145 | { |
||
146 | // TODO |
||
147 | } |
||
148 | */ |
||
149 | |||
150 | |||
151 | /** |
||
152 | * Inserts the default permissions for the given plugin from the access.xml. |
||
153 | * |
||
154 | * @param string $plugin the name of the plugin |
||
155 | * @param array $groups the ... |
||
156 | * |
||
157 | * @return void |
||
158 | */ |
||
159 | public function initiateDefault($plugin, $groups = []) |
||
194 | |||
195 | /** |
||
196 | * ... |
||
197 | * |
||
198 | * @param int $groupID ... |
||
199 | * |
||
200 | * @return void |
||
201 | */ |
||
202 | public function initiateGroup($groupID) |
||
212 | |||
213 | /** |
||
214 | * Loads the permissions for the given plugin. |
||
215 | * |
||
216 | * @param string $plugin the name of the plugin |
||
217 | * |
||
218 | * @return array an array with all permissions that are defined for the given |
||
219 | * plugin |
||
220 | */ |
||
221 | public function loadPermissions($plugin) |
||
241 | } |
||
242 |