aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php')
-rw-r--r--vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php46
1 files changed, 45 insertions, 1 deletions
diff --git a/vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php b/vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php
index 156470eee..8c41a5aa8 100644
--- a/vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php
+++ b/vendor/commerceguys/intl/src/NumberFormat/NumberFormat.php
@@ -68,6 +68,13 @@ final class NumberFormat
protected $decimalSeparator = '.';
/**
+ * The decimal separator for currency amounts.
+ *
+ * @var string
+ */
+ protected $decimalCurrencySeparator = '.';
+
+ /**
* The grouping separator.
*
* @var string
@@ -75,6 +82,13 @@ final class NumberFormat
protected $groupingSeparator = ',';
/**
+ * The grouping separator for currency amounts.
+ *
+ * @var string
+ */
+ protected $groupingCurrencySeparator = ',';
+
+ /**
* The plus sign.
*
* @var string
@@ -130,9 +144,19 @@ final class NumberFormat
if (isset($definition['decimal_separator'])) {
$this->decimalSeparator = $definition['decimal_separator'];
}
+ if (isset($definition['decimal_currency_separator'])) {
+ $this->decimalCurrencySeparator = $definition['decimal_currency_separator'];
+ } else {
+ $this->decimalCurrencySeparator = $this->decimalSeparator;
+ }
if (isset($definition['grouping_separator'])) {
$this->groupingSeparator = $definition['grouping_separator'];
}
+ if (isset($definition['grouping_currency_separator'])) {
+ $this->groupingCurrencySeparator = $definition['grouping_currency_separator'];
+ } else {
+ $this->groupingCurrencySeparator = $this->groupingSeparator;
+ }
if (isset($definition['plus_sign'])) {
$this->plusSign = $definition['plus_sign'];
}
@@ -227,7 +251,17 @@ final class NumberFormat
}
/**
- * Gets the grouping separator.
+ * Gets the decimal separator for currency amounts.
+ *
+ * @return string
+ */
+ public function getDecimalCurrencySeparator()
+ {
+ return $this->decimalCurrencySeparator;
+ }
+
+ /**
+ * Gets the grouping separator for currency amounts.
*
* @return string
*/
@@ -237,6 +271,16 @@ final class NumberFormat
}
/**
+ * Gets the currency grouping separator.
+ *
+ * @return string
+ */
+ public function getGroupingCurrencySeparator()
+ {
+ return $this->groupingCurrencySeparator;
+ }
+
+ /**
* Gets the plus sign.
*
* @return string