1 | <?php |
||
23 | final class InstitutionRole implements JsonSerializable |
||
24 | { |
||
25 | const ROLE_USE_RA = 'use_ra'; |
||
26 | const ROLE_USE_RAA = 'use_raa'; |
||
27 | const ROLE_SELECT_RAA = 'select_raa'; |
||
28 | |||
29 | private static $validRoles = [ |
||
30 | self::ROLE_USE_RA, |
||
31 | self::ROLE_USE_RAA, |
||
32 | self::ROLE_SELECT_RAA, |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $type; |
||
39 | |||
40 | /** |
||
41 | * InstitutionRole constructor. |
||
42 | * @param $type |
||
43 | */ |
||
44 | public function __construct($type) |
||
52 | |||
53 | /** |
||
54 | * @return InstitutionRole |
||
55 | */ |
||
56 | public static function useRa() |
||
60 | |||
61 | /** |
||
62 | * @return InstitutionRole |
||
63 | */ |
||
64 | public static function useRaa() |
||
68 | |||
69 | /** |
||
70 | * @return InstitutionRole |
||
71 | */ |
||
72 | public static function selectRaa() |
||
76 | |||
77 | /** |
||
78 | * @param InstitutionRole $role |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function equals(InstitutionRole $role) |
||
85 | |||
86 | /** |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getType() |
||
93 | |||
94 | public function jsonSerialize() |
||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function __toString() |
||
106 | } |
||
107 |