Ge Current Use Currency.

@return array
769153
public function getCurrency()
    {
        if (! empty($this->currency)) {
            return $this->currency;
        }

        return $this->setCurrency(config('currency.default'))->getCurrency();
    }
1095813
public static function getLoacleconv() {
        if (setlocale(LC_MONETARY, \Yii::$app->language)) {
            $arr = localeconv();

            //\Yii::error($arr['currency_symbol'] . setlocale(LC_MONETARY,0). '    ' . bin2hex($arr['mon_thousands_sep']));

            $arr['currency_symbol'] = iconv("Windows-1252", "UTF-8", $arr['currency_symbol']);
            $arr['mon_thousands_sep'] = iconv("Windows-1252", "UTF-8", $arr['mon_thousands_sep']);
            return $arr;
        } else {
            throw new \yii\base\Exception('Cannot set locale ' . \Yii::$app->language . '. Maybe the local is not installed. See php manual for further information');
        }
    }
923757
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;
	}
189036
function currencies() {
    global $db;
    $this->currencies = array();
    $currencies_query = "select code, title, symbol_left, symbol_right, decimal_point,
                                  thousands_point, decimal_places, value
                          from " . TABLE_CURRENCIES;

    $currencies = $db->Execute($currencies_query);

    while (!$currencies->EOF) {
      $this->currencies[$currencies->fields['code']] = array('title' => $currencies->fields['title'],
      'symbol_left' => $currencies->fields['symbol_left'],
      'symbol_right' => $currencies->fields['symbol_right'],
      'decimal_point' => $currencies->fields['decimal_point'],
      'thousands_point' => $currencies->fields['thousands_point'],
      'decimal_places' => $currencies->fields['decimal_places'],
      'value' => $currencies->fields['value']);

      $currencies->MoveNext();
    }
  }
1283787
public function currencies()
    {
        $currencies = $this->helper->loadJsonFiles($this->helper->dataDir('currencies/default'))->mapWithKeys(function ($country, $code) {
            return [upper($code) => $country];
        });

        $overload = $this->helper->loadJsonFiles($this->helper->dataDir('currencies/overload'))->mapWithKeys(function ($country, $code) {
            return [upper($code) => $country];
        });

        return $currencies->overwrite($overload);
    }
144051
public function getCurrencyCovIndex()
    {
        if ($this->_dConvIndex === null) {
            // currency conversion index value
            $oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
            $this->_dConvIndex = 1 / $oCur->rate;
        }

        return $this->_dConvIndex;
    }
1159919
public function getCurrency($currency = null): ?array
    {
        $currency = $currency ? mb_strtoupper($currency) : null;

        return $this->get("currency.{$currency}") ?: (current($this->get('currency', [])) ?: null);
    }
267681
public static function getCurrencies($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/currencies' . $filter->toQuery(), 'Currency');
    }
511726
private function loadCurrencyFromSession()
    {
        $currencyIdInSession = $this
            ->currencySessionManager
            ->get();

        return $currencyIdInSession
            ? $this->currency = $this
                ->currencyRepository
                ->find($currencyIdInSession)
            : null;
    }
437579
public function current()
    {
        switch ($this->flags & 0x0F) {
            default:
            case self::CURRENT_ARRAY:
                return [$this->lhs->current(), $this->rhs->current()];
            case self::CURRENT_LHS:
                return $this->lhs->current();
            case self::CURRENT_RHS:
                return $this->rhs->current();
            case self::CURRENT_0:
                return null;
        }
    }
92633
public function items($displayCurrency = false)
    {
        $items = $this->items->map->toArray();

        if (! $displayCurrency) {
            return $items->toArray();
        }

        setlocale(LC_MONETARY, config('cart_manager.LC_MONETARY'));

        return $items->map(function ($item) {
            $item['price'] = money_format('%n', $item['price']);

            return $item;
        })->toArray();
    }
730401
private function getCurrencies()
    {
        if (null === self::$currencies) {
            self::$currencies = $this->loadCurrencies();
        }

        return self::$currencies;
    }
1308188
public function getCurrencyNumeric()
    {
        $currency = Currency::find($this->getCurrency());

        return $currency ? $currency->getNumeric() : null;
    }
152476
protected function getCurrentEditionCurrency()
    {
        // Return the new language if a change is required.
        if (null !== $edit_currency_id = $this->getRequest()->get('edit_currency_id', null)) {
            if (null !== $edit_currency = CurrencyQuery::create()->findOneById($edit_currency_id)) {
                return $edit_currency;
            }
        }

        // Otherwise return the lang stored in session.
        return $this->getSession()->getAdminEditionCurrency();
    }
643488
public function getOldPrice()
    {
        $price = $this->price;
        if (\Yii::$app->getModule('shop')->enableCurrencyConversion) {
            $price = $price * Currency::currentCurrency();
        }
        if (\Yii::$app->getModule('shop')->enablePriceRounding) {
            $price = floor($price);
        }

        return $price;
    }
508319
public function getExchangeRateList()
    {
        if (!empty($this->exchangeRateList)) {
            return $this->exchangeRateList;
        }

        $this->exchangeRateList = [];

        $currencyBase = $this
            ->currencyRepository
            ->findOneBy([
                'iso' => $this->exchangeCurrencyIso,
            ]);

        $availableExchangeRates = $this
            ->currencyExchangeRateRepository
            ->findBy([
                'sourceCurrency' => $currencyBase,
            ]);

        /**
         * @var CurrencyExchangeRate $exchangeRate
         */
        foreach ($availableExchangeRates as $exchangeRate) {
            $targetCurrency = $exchangeRate->getTargetCurrency();
            $targetCurrencyIso = $targetCurrency->getIso();

            $this->exchangeRateList[$targetCurrencyIso] = [
                'rate' => $exchangeRate->getExchangeRate(),
                'currency' => $targetCurrency,
            ];
        }

        return $this->exchangeRateList;
    }
460237
public function getCurrencyList()
    {
        if ($this->currencyList === null) {
            $this->currencyList = require __DIR__ . '/../Resources/currencies.php';

            $custom = Config::getInstance()->General['currencies'];
            foreach ($custom as $code => $name) {
                $this->currencyList[$code] = array($code, $name);
            }
        }

        return $this->currencyList;
    }