PHP 인터페이스 WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface

저자: Adam Piotrowski ([email protected])
파일 보기 프로젝트 열기: wellcommerce/wellcommerce 0 사용 예제들

공개 메소드들

메소드 설명
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