1 | <?php |
||
5 | class CurrencyConverter |
||
6 | { |
||
7 | private $fromCurrency; |
||
8 | |||
9 | private $toCurrency; |
||
10 | |||
11 | private $apiKey; |
||
12 | |||
13 | private $apiCaller; |
||
14 | |||
15 | 3 | public function __construct(string $apiKey) |
|
20 | |||
21 | 3 | public function convert(string $fromCurrency, string $toCurrency, $amount) :float |
|
32 | |||
33 | 2 | private function calculateValue($rate, $amount) :float |
|
39 | |||
40 | 2 | public function setApiCaller(ApiCaller $apiCaller) |
|
44 | } |
||
45 |