| 1 | <?php |
||
| 9 | final class GroupPolicy implements PolicyInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | const ATTRIBUTE_GROUPS = 'groups'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string[] |
||
| 18 | */ |
||
| 19 | private $groups; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param array $groups |
||
| 23 | */ |
||
| 24 | 4 | public function __construct(array $groups) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @param NormalizerContextInterface $context |
||
| 31 | * @param object|mixed $object |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | 4 | public function isCompliant(NormalizerContextInterface $context, $object): bool |
|
| 51 | } |
||
| 52 |