]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/intl/Symfony/Component/Intl/ResourceBundle/CurrencyBundleInterface.php
twig implementation
[github/wallabag/wallabag.git] / vendor / symfony / intl / Symfony / Component / Intl / ResourceBundle / CurrencyBundleInterface.php
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Intl\ResourceBundle;
13
14 /**
15 * Gives access to currency-related ICU data.
16 *
17 * @author Bernhard Schussek <bschussek@gmail.com>
18 */
19 interface CurrencyBundleInterface extends ResourceBundleInterface
20 {
21 /**
22 * Returns the symbol used for a currency.
23 *
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()}.
27 *
28 * @return string|null The currency symbol or NULL if not found.
29 */
30 public function getCurrencySymbol($currency, $locale = null);
31
32 /**
33 * Returns the name of a currency.
34 *
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()}.
38 *
39 * @return string|null The name of the currency or NULL if not found.
40 */
41 public function getCurrencyName($currency, $locale = null);
42
43 /**
44 * Returns the names of all known currencies.
45 *
46 * @param string $locale Optional. The locale to return the names in.
47 * Defaults to {@link \Locale::getDefault()}.
48 *
49 * @return string[] A list of currency names indexed by currency codes.
50 */
51 public function getCurrencyNames($locale = null);
52
53 /**
54 * Returns the number of digits after the comma of a currency.
55 *
56 * @param string $currency A currency code (e.g. "EUR").
57 *
58 * @return integer|null The number of digits after the comma or NULL if not found.
59 */
60 public function getFractionDigits($currency);
61
62 /**
63 * Returns the rounding increment of a currency.
64 *
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.
68 *
69 * @param string $currency A currency code (e.g. "EUR").
70 *
71 * @return float|integer|null The rounding increment or NULL if not found.
72 */
73 public function getRoundingIncrement($currency);
74 }