blob: 36f7d7995a4092c41c8e4a5a232270488ab437b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php
namespace CommerceGuys\Intl\Currency;
use CommerceGuys\Intl\Exception\UnknownCurrencyException;
/**
* Currency repository interface.
*/
interface CurrencyRepositoryInterface
{
/**
* Gets a currency matching the provided currency code.
*
* @param string $currencyCode The currency code.
* @param string|null $locale The locale (i.e. fr-FR).
*
* @return Currency
*
* @throws UnknownCurrencyException
*/
public function get(string $currencyCode, string $locale = null): Currency;
/**
* Gets all currencies.
*
* @param string|null $locale The locale (i.e. fr-FR).
*
* @return Currency[] An array of currencies, keyed by currency code.
*/
public function getAll(string $locale = null): array;
/**
* Gets a list of currencies.
*
* @param string|null $locale The locale (i.e. fr-FR).
*
* @return string[] An array of currency names, keyed by currency code.
*/
public function getList(string $locale = null): array;
}
|