The current number formatter.

@return \CommerceGuys\Intl\Formatter\CurrencyFormatter
321584
protected function formatter()
    {
        $key = $this->getLocalesKey(
            $locale = $this->getLocale(),
            $fallbackLocale = $this->getFallbackLocale()
        );

        if (! isset($this->formatters[$key])) {
            $this->formatters[$key] = new CurrencyFormatter(
                new NumberFormatRepository($fallbackLocale),
                $this->data(),
                ['locale' => $locale]
            );
        }

        return $this->formatters[$key];
    }
769153
public function getCurrency()
    {
        if (! empty($this->currency)) {
            return $this->currency;
        }

        return $this->setCurrency(config('currency.default'))->getCurrency();
    }
350577
public static function defaultCurrency($currency = null)
    {
        if (!empty($currency)) {
            return self::$_defaultCurrency = $currency;
        }

        if ($currency === false) {
            return self::$_defaultCurrency = null;
        }

        if (empty(self::$_defaultCurrency)) {
            $locale = ini_get('intl.default_locale') ?: static::DEFAULT_LOCALE;
            $formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY);
            self::$_defaultCurrency = $formatter->getTextAttribute(NumberFormatter::CURRENCY_CODE);
        }

        return self::$_defaultCurrency;
    }
379834
public function formatCurrency()
    {
        $currencies = json_decode(file_get_contents(__DIR__.'/../Currencies.json'));
        $currency = $this->currency;

        return $currencies->$currency;
    }
929987
protected function getCurrencyAttribute()
    {
        if (empty($this->sActiveCurrency)) {
            return CurrencyHelper::instance()->getActiveCurrencySymbol();
        }

        $sResult = CurrencyHelper::instance()->getCurrencySymbol($this->sActiveCurrency);
        $this->sActiveCurrency = null;

        return $sResult;
    }
577381
public function getFormatter()
    {
        $formatterFile = $this->fixPath($this->_formatterPath).$this->_formatter.'.php';
        if (is_file($formatterFile)) {
            require_once($formatterFile);

            return new $this->_formatter();
        } else {
            $this->error('Could not find formatter "'.$formatterFile.'"');
            exit;
        }
    }
887221
public function display()
    {
        $formatter = new \NumberFormatter($this->locale->get(), \NumberFormatter::CURRENCY);
        $formatter->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, $this->symbol->get());
        $formatter->setAttribute(\NumberFormatter::FRACTION_DIGITS, $this->precision->get());

        return new StringType(sprintf($this->displayFormat, $formatter->format($this->getAsFloat())));
    }
889871
public function getTotalNetPriceFormated()
    {
        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();
        $oOrder = $this->getOrder();
        $oCurrency = \OxidEsales\Eshop\Core\Registry::getConfig()->getCurrencyObject($oOrder->oxorder__oxcurrency->value);

        return $oLang->formatCurrency($this->oxorderarticles__oxnetprice->value, $oCurrency);
    }
627349
public function Value()
    {
        // Show invalid value back to user in case of error
        if ($this->value === null || $this->value === false) {
            return $this->originalValue;
        }
        $formatter = $this->getFormatter();
        return $formatter->format($this->value, $this->getNumberType());
    }
1308188
public function getCurrencyNumeric()
    {
        $currency = Currency::find($this->getCurrency());

        return $currency ? $currency->getNumeric() : null;
    }
1041896
public static function getCurrencyCode()
    {
        if (!isset(self::$currencyCode)) {
            $localeconv = localeconv();
            self::$currencyCode = ($localeconv['currency_symbol'] != '')
                ? $localeconv['currency_symbol'] : $localeconv['int_curr_symbol'];

            if (self::$currencyCode == '') {
                // Default to $
                self::$currencyCode = '$';
            }
        }
        return self::$currencyCode;
    }
983215
public function format($money = null)
    {
        if (!$money) {
            return null;
        } else {
            return $this->numberFormatter->formatCurrency(
                $money->amount,
                $money->currency->code
            );
        }

    }
1073128
public function format($value)
    {
        $formatter = new NumberFormatter($this->locale(), NumberFormatter::CURRENCY);

        $code = $this->code($value);
        $divisor = $this->divisor($code);
        $amount = $this->convert($value, $divisor);

        return $formatter->formatCurrency($amount, $code);
    }
412266
public function current()
    {
        $extractor = $this->_value;
        $current = $this->_fetchCurrent();
        $spacer = str_repeat($this->_spacer, $this->getDepth());

        return $spacer . $extractor($current, parent::key(), $this);
    }
661428
public function getValue()
    {
        if (!$this->exists()) {
            return null;
        }
        $amount = $this->getAmount();
        $currency = $this->getCurrency();
        if (empty($currency)) {
            return $amount;
        }
        return $amount . ' ' . $currency;
    }
677403
public function getFormatter()
    {
        $fmt = $this->settings->format;
        $formatter = null;
        if (!is_string($fmt) && is_subclass_of($fmt, 'Luminous\\Formatters\\Formatter')) {
            $formatter = clone $fmt;
        } elseif ($fmt === 'html') {
            $formatter = new HtmlFormatter();
        } elseif ($fmt ===  'html-inline') {
            $formatter = new InlineHtmlFormatter();
        } elseif ($fmt ===  'html-full') {
            $formatter = new FullPageHtmlFormatter();
        } elseif ($fmt === 'latex') {
            $formatter = new LatexFormatter();
        } elseif ($fmt === 'ansi') {
            $formatter = new AnsiFormatter();
        } elseif ($fmt ===  null || $fmt === 'none') {
            $formatter = new IdentityFormatter();
        }

        if ($formatter === null) {
            throw new Exception('Unknown formatter: ' . $this->settings->format);
            return null;
        }
        $this->setFormatterOptions($formatter);
        return $formatter;
    }
653964
public function currencyList() {
		$res = $this->availableCurrencies();
		foreach ($res as $key => $val) {
			$val = $key;

			$valExt = $this->CurrencyLib->getName($key);
			if ($valExt) {
				$val .= ' - ' . $valExt;
			}

			$res[$key] = $val;
		}
		return $res;
	}