14
14
use Casbin \Persist \AdapterHelper ;
15
15
use DateTime ;
16
16
use Casbin \Exceptions \InvalidFilterTypeException ;
17
+ use Throwable ;
17
18
18
19
/**
19
20
* DatabaseAdapter.
@@ -182,6 +183,7 @@ public function removePolicy(string $sec, string $ptype, array $rule): void
182
183
* @param string $sec
183
184
* @param string $ptype
184
185
* @param string[][] $rules
186
+ * @throws Throwable
185
187
*/
186
188
public function removePolicies (string $ sec , string $ ptype , array $ rules ): void
187
189
{
@@ -229,11 +231,12 @@ public function _removeFilteredPolicy(string $sec, string $ptype, int $fieldInde
229
231
* RemoveFilteredPolicy removes policy rules that match the filter from the storage.
230
232
* This is part of the Auto-Save feature.
231
233
*
232
- * @param string $sec
233
- * @param string $ptype
234
- * @param int $fieldIndex
234
+ * @param string $sec
235
+ * @param string $ptype
236
+ * @param int $fieldIndex
235
237
* @param string|null ...$fieldValues
236
238
* @return void
239
+ * @throws Throwable
237
240
*/
238
241
public function removeFilteredPolicy (string $ sec , string $ ptype , int $ fieldIndex , ?string ...$ fieldValues ): void
239
242
{
@@ -276,6 +279,7 @@ public function updatePolicy(string $sec, string $ptype, array $oldRule, array $
276
279
* @param string[][] $oldRules
277
280
* @param string[][] $newRules
278
281
* @return void
282
+ * @throws Throwable
279
283
*/
280
284
public function updatePolicies (string $ sec , string $ ptype , array $ oldRules , array $ newRules ): void
281
285
{
@@ -295,6 +299,7 @@ public function updatePolicies(string $sec, string $ptype, array $oldRules, arra
295
299
* @param integer $fieldIndex
296
300
* @param string ...$fieldValues
297
301
* @return array
302
+ * @throws Throwable
298
303
*/
299
304
public function updateFilteredPolicies (string $ sec , string $ ptype , array $ newPolicies , int $ fieldIndex , string ...$ fieldValues ): array
300
305
{
@@ -311,6 +316,7 @@ public function updateFilteredPolicies(string $sec, string $ptype, array $newPol
311
316
*
312
317
* @param Model $model
313
318
* @param mixed $filter
319
+ * @throws InvalidFilterTypeException
314
320
*/
315
321
public function loadFilteredPolicy (Model $ model , $ filter ): void
316
322
{
0 commit comments