PHP 클래스 WellCommerce\Bundle\CurrencyBundle\Twig\Extension\CurrencyExtension

저자: Adam Piotrowski ([email protected])
상속: extends Twig_Extension, implements Twig_Extension_GlobalsInterface
파일 보기 프로젝트 열기: wellcommerce/wellcommerce

보호된 프로퍼티들

프로퍼티 타입 설명
$dataset WellCommerce\Component\DataSet\DataSetInterface
$helper WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface

공개 메소드들

메소드 설명
__construct ( WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface $helper, WellCommerce\Component\DataSet\DataSetInterface $dataset ) Constructor
convertPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, integer $quantity = 1 ) : string Converts the given amount
formatPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, null | string $locale = null, $quantity = 1 ) : string Formats the given amount
getCurrencies ( ) : array Returns an array of currencies
getFunctions ( )
getName ( )

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface $helper, WellCommerce\Component\DataSet\DataSetInterface $dataset )
$helper WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface
$dataset WellCommerce\Component\DataSet\DataSetInterface

convertPrice() 공개 메소드

Converts the given amount
public convertPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, integer $quantity = 1 ) : string
$price float
$baseCurrency null | string
$targetCurrency null | string
$quantity integer
리턴 string

formatPrice() 공개 메소드

Formats the given amount
public formatPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, null | string $locale = null, $quantity = 1 ) : string
$price float
$baseCurrency null | string
$targetCurrency null | string
$locale null | string
리턴 string

getCurrencies() 공개 메소드

Returns an array of currencies
public getCurrencies ( ) : array
리턴 array

getFunctions() 공개 메소드

public getFunctions ( )

getName() 공개 메소드

public getName ( )

프로퍼티 상세

$dataset 보호되어 있는 프로퍼티

protected DataSetInterface,WellCommerce\Component\DataSet $dataset
리턴 WellCommerce\Component\DataSet\DataSetInterface

$helper 보호되어 있는 프로퍼티

protected CurrencyHelperInterface,WellCommerce\Bundle\CurrencyBundle\Helper $helper
리턴 WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface