Property | Type | Description | |
---|---|---|---|
$currencyRepository | WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface | ||
$helper | WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface | ||
$managedCurrencies | array | ||
$ratesRepository | WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface |
Method | Description | |
---|---|---|
__construct ( WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface $currencyRepository, WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface $ratesRepository, WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $helper ) | Constructor |
Method | Description | |
---|---|---|
addUpdateExchangeRate ( string $currencyFrom, string $currencyTo, float $rate ) | Adds new rate or updates existing one | |
formatExchangeRate ( float $rate ) : string | Formats the exchange rate | |
getCurrencies ( ) : |
Returns all currencies from repository | |
setManagedCurrencies ( ) | Sets all managed currencies |
public __construct ( WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface $currencyRepository, WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface $ratesRepository, WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $helper ) | ||
$currencyRepository | WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface | |
$ratesRepository | WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface | |
$helper | WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface |
protected formatExchangeRate ( float $rate ) : string | ||
$rate | float | |
return | string |
protected getCurrencies ( ) : |
||
return |
protected setManagedCurrencies ( ) |
protected CurrencyRepositoryInterface,WellCommerce\Bundle\CurrencyBundle\Repository $currencyRepository | ||
return | WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface |
protected DoctrineHelperInterface,WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine $helper | ||
return | WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface |