1 | <?php |
||
19 | class EcbDriver implements CurrencyDriverInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var null|Client |
||
23 | */ |
||
24 | private $httpClient; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $url; |
||
30 | |||
31 | /** |
||
32 | * @param null|Client $httpClient |
||
33 | * @param string $url |
||
34 | */ |
||
35 | public function __construct(Client $httpClient, $url) |
||
40 | |||
41 | /** |
||
42 | * Downloads raw currency data. |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | private function getRawData() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function getRates($date = null) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | public function getBaseCurrency() |
||
94 | } |
||
95 |
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: