From 833886f970d157bc0cdc59179eabe22543bf6381 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 22 Dec 2022 12:30:02 +0100 Subject: [PATCH] add function to retreive Currency --- Localization/Money.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Localization/Money.php b/Localization/Money.php index 52bd7e4a8..01fa91e95 100755 --- a/Localization/Money.php +++ b/Localization/Money.php @@ -96,4 +96,15 @@ final class Money extends FloatInt { return ($this->position === 0 && !empty($this->symbol) ? $this->symbol . ' ' : '') . $this->getAmount($decimals) . ($this->position === 1 ? ' ' . $this->symbol : ''); } + + /** + * Get currency symbol + * + * @return string + * @since 1.0.0 + */ + public function getCurrencySymbol() : string + { + return $this->symbol; + } }