Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс Price

Открытые статические члены

static handlerAfterUpdateCurrencyBaseRate (Main\Event $event)
 
static getRoundRules ($priceType)
 
static clearRoundRulesCache ($priceType)
 
static searchRoundRule ( $priceType, $price, $currency='')
 
static roundPrice ($priceType, $price, $currency)
 
static roundValue ($value, $precision, $type)
 

Открытые атрибуты

const CACHE_ID = 'catalog_price_round_'
 
const CACHE_TIME = 360000
 
const VALUE_EPS = 1E-6
 

Защищенные статические члены

static getRulesCacheId ($priceType)
 
static roundWhole ($value, $precision, $type)
 
static roundFraction ($value, $precision, $type)
 

Статические защищенные данные

static $roundRules = array()
 

Подробное описание

См. определение в файле price.php строка 12

Методы

◆ clearRoundRulesCache()

static clearRoundRulesCache ( $priceType)
static

Clear cache rules for price type.

Аргументы
int$priceTypePrice type id.
Возвращает
void

См. определение в файле price.php строка 153

◆ getRoundRules()

static getRoundRules ( $priceType)
static

Return round rules list for price type.

Аргументы
int$priceTypePrice type id.
Возвращает
array

См. определение в файле price.php строка 136

◆ getRulesCacheId()

static getRulesCacheId ( $priceType)
staticprotected

Return cache id for price type.

Аргументы
string | int$priceTypePrice type id.
Возвращает
string

См. определение в файле price.php строка 249

◆ handlerAfterUpdateCurrencyBaseRate()

static handlerAfterUpdateCurrencyBaseRate ( Main\Event $event)
static

Handler onAfterUpdateCurrencyBaseRate for update field PRICE_SCALE after change currency base rate.

Аргументы
Main\Event$eventEvent data (old and new currency rate).
Возвращает
void

См. определение в файле price.php строка 30

◆ roundFraction()

static roundFraction ( $value,
$precision,
$type )
staticprotected

Round fraction part.

Аргументы
float | int$valueRound value.
float | int$precisionPrecision.
int$typeRound type.
Возвращает
float

См. определение в файле price.php строка 294

◆ roundPrice()

static roundPrice ( $priceType,
$price,
$currency )
static

Round price.

Аргументы
int$priceTypePrice type id.
float | int$pricePrice value.
string$currencyCurrency.
Возвращает
float|int

См. определение в файле price.php строка 199

◆ roundValue()

static roundValue ( $value,
$precision,
$type )
static

Round value with arbitrary precision.

Аргументы
float | int$valueRound value.
float | int$precisionPrecision.
int$typeRound type.
Возвращает
float|int

См. определение в файле price.php строка 221

◆ roundWhole()

static roundWhole ( $value,
$precision,
$type )
staticprotected

Round whole part.

Аргументы
float | int$valueRound value.
float | int$precisionPrecision.
int$typeRound type.
Возвращает
float|int

См. определение в файле price.php строка 262

◆ searchRoundRule()

static searchRoundRule ( $priceType,
$price,
$currency = '' )
static

Get rule for price value.

Аргументы
int$priceTypePrice type id.
float | int$pricePrice value.
string$currencyPrice currency.
Возвращает
array
Аргументы
$currency@noinspection PhpUnusedParameterInspection

См. определение в файле price.php строка 174

Данные класса

◆ $roundRules

$roundRules = array()
staticprotected

См. определение в файле price.php строка 22

◆ CACHE_ID

const CACHE_ID = 'catalog_price_round_'

См. определение в файле price.php строка 15

◆ CACHE_TIME

const CACHE_TIME = 360000

См. определение в файле price.php строка 17

◆ VALUE_EPS

const VALUE_EPS = 1E-6

См. определение в файле price.php строка 19