| Total Complexity | 5 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class PageCategoryProvider implements CasbinAdapter |
||
| 14 | { |
||
| 15 | use PolicyProviderTrait; |
||
|
|
|||
| 16 | |||
| 17 | const PREFIX = 'page_category'; |
||
| 18 | |||
| 19 | /** @var AuthLoader */ |
||
| 20 | protected $authLoader; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * PageCategoryProvider constructor. |
||
| 24 | * |
||
| 25 | * @param AuthLoader $authLoader |
||
| 26 | */ |
||
| 27 | public function __construct(AuthLoader $authLoader) |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 35 | * |
||
| 36 | * @param Model $model |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function savePolicy($model) |
||
| 41 | { |
||
| 42 | return true; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 47 | * |
||
| 48 | * @param string $sec |
||
| 49 | * @param string $ptype |
||
| 50 | * @param array $rule |
||
| 51 | * |
||
| 52 | * @return void |
||
| 53 | */ |
||
| 54 | public function addPolicy($sec, $ptype, $rule) |
||
| 55 | { |
||
| 56 | return; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 61 | * |
||
| 62 | * @param string $sec |
||
| 63 | * @param string $ptype |
||
| 64 | * @param array $rule |
||
| 65 | * |
||
| 66 | * @return int |
||
| 67 | */ |
||
| 68 | public function removePolicy($sec, $ptype, $rule) |
||
| 69 | { |
||
| 70 | $count = 0; |
||
| 71 | |||
| 72 | return $count; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 77 | * |
||
| 78 | * @param $sec |
||
| 79 | * @param $ptype |
||
| 80 | * @param $fieldIndex |
||
| 81 | * @param mixed ...$fieldValues |
||
| 82 | * |
||
| 83 | * @throws CasbinException |
||
| 84 | */ |
||
| 85 | public function removeFilteredPolicy($sec, $ptype, $fieldIndex, ...$fieldValues) |
||
| 88 | } |
||
| 89 | } |
||
| 90 |