1 | <?php |
||
5 | class ServiceInfoCollection |
||
6 | { |
||
7 | /** @var ServiceInfo[] */ |
||
8 | private $data = array(); |
||
9 | |||
10 | |||
11 | /** |
||
12 | * @param ServiceInfo $serviceInfo |
||
13 | */ |
||
14 | 6 | public function add(ServiceInfo $serviceInfo) |
|
18 | |||
19 | |||
20 | /** |
||
21 | * @param string $id |
||
22 | * @return ServiceInfo|null |
||
23 | */ |
||
24 | 3 | public function get($id) |
|
31 | |||
32 | |||
33 | /** |
||
34 | * @return ServiceInfo[] |
||
35 | */ |
||
36 | 2 | public function all() |
|
40 | |||
41 | |||
42 | /** |
||
43 | * @param string $entityID |
||
44 | * @return ServiceInfo|null |
||
45 | */ |
||
46 | 2 | public function findByIDPEntityID($entityID) |
|
57 | |||
58 | |||
59 | /** |
||
60 | * @param string|null $as |
||
61 | * @return ServiceInfo|null |
||
62 | */ |
||
63 | 3 | public function findByAS($as) |
|
74 | } |
||
75 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: