4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Intl\ResourceBundle
;
15 * Gives access to currency-related ICU data.
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 interface CurrencyBundleInterface
extends ResourceBundleInterface
22 * Returns the symbol used for a currency.
24 * @param string $currency A currency code (e.g. "EUR").
25 * @param string $locale Optional. The locale to return the result in.
26 * Defaults to {@link \Locale::getDefault()}.
28 * @return string|null The currency symbol or NULL if not found.
30 public function getCurrencySymbol($currency, $locale = null);
33 * Returns the name of a currency.
35 * @param string $currency A currency code (e.g. "EUR").
36 * @param string $locale Optional. The locale to return the name in.
37 * Defaults to {@link \Locale::getDefault()}.
39 * @return string|null The name of the currency or NULL if not found.
41 public function getCurrencyName($currency, $locale = null);
44 * Returns the names of all known currencies.
46 * @param string $locale Optional. The locale to return the names in.
47 * Defaults to {@link \Locale::getDefault()}.
49 * @return string[] A list of currency names indexed by currency codes.
51 public function getCurrencyNames($locale = null);
54 * Returns the number of digits after the comma of a currency.
56 * @param string $currency A currency code (e.g. "EUR").
58 * @return integer|null The number of digits after the comma or NULL if not found.
60 public function getFractionDigits($currency);
63 * Returns the rounding increment of a currency.
65 * The rounding increment indicates to which number a currency is rounded.
66 * For example, 1230 rounded to the nearest 50 is 1250. 1.234 rounded to the
67 * nearest 0.65 is 1.3.
69 * @param string $currency A currency code (e.g. "EUR").
71 * @return float|integer|null The rounding increment or NULL if not found.
73 public function getRoundingIncrement($currency);