1 | <?php |
||
27 | class Loa |
||
28 | { |
||
29 | /** |
||
30 | * The different levels |
||
31 | */ |
||
32 | const LOA_1 = 1; |
||
33 | const LOA_2 = 2; |
||
34 | const LOA_3 = 3; |
||
35 | |||
36 | /** |
||
37 | * @var int |
||
38 | */ |
||
39 | private $level; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $identifier; |
||
45 | |||
46 | /** |
||
47 | * @param int $level |
||
48 | * @param string $identifier |
||
49 | */ |
||
50 | public function __construct($level, $identifier) |
||
68 | |||
69 | /** |
||
70 | * @param string $identifier |
||
71 | * @return bool |
||
72 | */ |
||
73 | public function isIdentifiedBy($identifier) |
||
77 | |||
78 | /** |
||
79 | * @param int $level |
||
80 | * @return bool |
||
81 | */ |
||
82 | public function levelIsLowerOrEqualTo($level) |
||
86 | |||
87 | /** |
||
88 | * @param int $level |
||
89 | * @return bool |
||
90 | */ |
||
91 | public function levelIsHigherOrEqualTo($level) |
||
95 | |||
96 | /** |
||
97 | * @param Loa $loa |
||
98 | * @return bool |
||
99 | */ |
||
100 | public function canSatisfyLoa(Loa $loa) |
||
104 | |||
105 | /** |
||
106 | * @param Loa $loa |
||
107 | * @return bool |
||
108 | */ |
||
109 | public function equals(Loa $loa) |
||
114 | |||
115 | /** |
||
116 | * @param int $loaLevel |
||
117 | * @return bool |
||
118 | */ |
||
119 | public function isOfLevel($loaLevel) |
||
123 | |||
124 | public function getLevel(): int |
||
128 | |||
129 | public function __toString() |
||
133 | } |
||
134 |