PHP Интерфейс WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface

Автор: Adam Piotrowski ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
convert ( float $amount, string $baseCurrency = null, string $targetCurrency = null, integer $quantity = 1 ) : float Converts the amount between currencies
convertAndFormat ( float $amount, string $baseCurrency = null, string $targetCurrency = null, integer $quantity = 1, string $locale = null ) : string Firts converts and then formats the amount
format ( float $amount, string $currency = null, string $locale = null ) : string Formats the given amount
getCurrencyRate ( string $baseCurrency = null, string $targetCurrency = null ) : float Returns the exchange rate

Описание методов

convert() публичный Метод

Converts the amount between currencies
public convert ( float $amount, string $baseCurrency = null, string $targetCurrency = null, integer $quantity = 1 ) : float
$amount float
$baseCurrency string
$targetCurrency string
$quantity integer
Результат float

convertAndFormat() публичный Метод

Firts converts and then formats the amount
public convertAndFormat ( float $amount, string $baseCurrency = null, string $targetCurrency = null, integer $quantity = 1, string $locale = null ) : string
$amount float
$baseCurrency string
$targetCurrency string
$quantity integer
$locale string
Результат string

format() публичный Метод

Formats the given amount
public format ( float $amount, string $currency = null, string $locale = null ) : string
$amount float
$currency string
$locale string
Результат string

getCurrencyRate() публичный Метод

Returns the exchange rate
public getCurrencyRate ( string $baseCurrency = null, string $targetCurrency = null ) : float
$baseCurrency string
$targetCurrency string
Результат float