aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php')
-rw-r--r--vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php b/vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php
new file mode 100644
index 000000000..3fc25fcc6
--- /dev/null
+++ b/vendor/commerceguys/intl/src/Formatter/CurrencyFormatterInterface.php
@@ -0,0 +1,54 @@
+<?php
+
+namespace CommerceGuys\Intl\Formatter;
+
+interface CurrencyFormatterInterface
+{
+ /**
+ * Formats a currency amount.
+ *
+ * Supported options:
+ * - locale: The locale. Default: 'en'.
+ * - use_grouping: Whether to use grouping separators,
+ * such as thousands separators.
+ * Default: true.
+ * - minimum_fraction_digits: Minimum fraction digits.
+ * - maximum_fraction_digits: Minimum fraction digits.
+ * - rounding_mode: The rounding mode.
+ * A PHP_ROUND_ constant or 'none' to skip
+ * rounding. Default: PHP_ROUND_HALF_UP.
+ * - style: The style.
+ * One of: 'standard', 'accounting'.
+ * Default: 'standard'.
+ * - currency_display: How the currency should be displayed.
+ * One of: 'code', 'symbol', 'none'.
+ * Default: 'symbol'.
+ *
+ * Both minimum_fraction_digits and maximum_fraction_digits default
+ * to the currency's number of fraction digits.
+ *
+ * @param string $number The number.
+ * @param string $currencyCode The currency code.
+ * @param array $options The formatting options.
+ *
+ * @return string The formatted number.
+ */
+ public function format($number, $currencyCode, array $options = []);
+
+ /**
+ * Parses a formatted currency amount.
+ *
+ * Commonly used in input widgets where the end-user might input
+ * a number using digits and symbols common to their locale.
+ *
+ * Supported options:
+ * - locale: The locale. Default: 'en'.
+ *
+ * @param string $number The formatted number.
+ * @param string $currencyCode The currency code.
+ * @param array $options The parsing options.
+ *
+ * @return string|false The parsed number or FALSE on error.
+ */
+ public function parse($number, $currencyCode, array $options = []);
+}