1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Casbin\Persist; |
||
6 | |||
7 | use Casbin\Model\Model; |
||
8 | |||
9 | /** |
||
10 | * Interface FilteredAdapter. |
||
11 | * the filtered file adapter for Casbin. It can load policy from file or save policy to file and supports loading of filtered policies. |
||
12 | * |
||
13 | * @author [email protected] |
||
14 | */ |
||
15 | interface FilteredAdapter extends Adapter |
||
16 | { |
||
17 | /** |
||
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
18 | * loads only policy rules that match the filter. |
||
19 | * |
||
20 | * @param Model $model |
||
0 ignored issues
–
show
|
|||
21 | * @param $filter |
||
0 ignored issues
–
show
|
|||
22 | */ |
||
23 | public function loadFilteredPolicy(Model $model, $filter): void; |
||
24 | |||
25 | /** |
||
26 | * returns true if the loaded policy has been filtered. |
||
27 | * |
||
28 | * @return bool |
||
29 | */ |
||
30 | public function isFiltered(): bool; |
||
31 | } |
||
32 |