| @@ 55-72 (lines=18) @@ | ||
| 52 | /** |
|
| 53 | * {@inheritdoc} |
|
| 54 | */ |
|
| 55 | public function has($alias, $date = null) |
|
| 56 | { |
|
| 57 | if (array_key_exists($alias, $this->registry)) { |
|
| 58 | /** |
|
| 59 | * @var Configuration $configuration |
|
| 60 | */ |
|
| 61 | $configuration = $this->registry[$alias]; |
|
| 62 | ||
| 63 | return $this->manager->has( |
|
| 64 | $configuration->getSource(), |
|
| 65 | $configuration->getCurrencyCode(), |
|
| 66 | $date, |
|
| 67 | $configuration->getRateType() |
|
| 68 | ); |
|
| 69 | } |
|
| 70 | ||
| 71 | throw new \RuntimeException(sprintf('Unknown alias "%s".', $alias)); |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * {@inheritdoc} |
|
| @@ 77-94 (lines=18) @@ | ||
| 74 | /** |
|
| 75 | * {@inheritdoc} |
|
| 76 | */ |
|
| 77 | public function get($alias, $date = null) |
|
| 78 | { |
|
| 79 | if (array_key_exists($alias, $this->registry)) { |
|
| 80 | /** |
|
| 81 | * @var Configuration $configuration |
|
| 82 | */ |
|
| 83 | $configuration = $this->registry[$alias]; |
|
| 84 | ||
| 85 | return $this->manager->get( |
|
| 86 | $configuration->getSource(), |
|
| 87 | $configuration->getCurrencyCode(), |
|
| 88 | $date, |
|
| 89 | $configuration->getRateType() |
|
| 90 | ); |
|
| 91 | } |
|
| 92 | ||
| 93 | throw new \RuntimeException(sprintf('Unknown alias "%s".', $alias)); |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * {@inheritdoc} |
|
| @@ 99-115 (lines=17) @@ | ||
| 96 | /** |
|
| 97 | * {@inheritdoc} |
|
| 98 | */ |
|
| 99 | public function latest($alias, $date = null) |
|
| 100 | { |
|
| 101 | if (array_key_exists($alias, $this->registry)) { |
|
| 102 | /** |
|
| 103 | * @var Configuration $configuration |
|
| 104 | */ |
|
| 105 | $configuration = $this->registry[$alias]; |
|
| 106 | ||
| 107 | return $this->manager->latest( |
|
| 108 | $configuration->getSource(), |
|
| 109 | $configuration->getCurrencyCode(), |
|
| 110 | $configuration->getRateType() |
|
| 111 | ); |
|
| 112 | } |
|
| 113 | ||
| 114 | throw new \RuntimeException(sprintf('Unknown alias "%s".', $alias)); |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * {@inheritdoc} |
|