symbol = $symbol; $this->position = $position; parent::setLocalization($thousands, $decimal); return $this; } /** * Get money. * * @param int $decimals Precision (null = auto decimals) * * @return string * * @since 1.0.0 */ public function getCurrency(?int $decimals = 2, int $position = null, string $symbol = null) : string { return (($position ?? $this->position) === 0 && !empty($symbol ?? $this->symbol) ? ($symbol ?? $this->symbol) . ' ' : '' ) . $this->getAmount($decimals) . (($position ?? $this->position) === 1 && !empty($symbol ?? $this->symbol) ? ' ' . ($symbol ?? $this->symbol) : ''); } /** * Get currency symbol * * @return string * @since 1.0.0 */ public function getCurrencySymbol() : string { return $this->symbol; } }