Beispiel #1
0
/**
 * 2016-07-04
 * @param Currency|string|null $currency [optional]
 * @return string
 */
function df_currency_code($currency = null)
{
    return df_currency($currency)->getCode();
}
Beispiel #2
0
/**
 * 2016-11-15
 * @param O|Q $oq
 * @return Currency
 */
function dfp_currency($oq)
{
    return $oq instanceof O ? $oq->getOrderCurrency() : ($oq instanceof Q ? df_currency($oq->getQuoteCurrencyCode()) : df_error());
}
Beispiel #3
0
 /**
  * 2016-09-05
  * Текущая валюта может меняться динамически (в том числе посетителем магазина и сессией),
  * поэтому мы используем параметр $store, а не $scope
  * @param string $code
  * @param null|string|int|S|Store $store [optional]
  * @param CurrencyM|string|null $orderCurrency [optional]
  * @return CurrencyM
  */
 public static function v($code, $store = null, $orderCurrency = null)
 {
     return df_currency(dftr($code ?: self::$ORDER, self::map($store, $orderCurrency)));
 }