add function to retreive Currency

This commit is contained in:
Dennis Eichhorn 2022-12-22 12:30:02 +01:00
parent cd0456e1be
commit 833886f970

View File

@ -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 : ''); 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;
}
} }