PHP Class WellCommerce\Bundle\CurrencyBundle\Importer\AbstractExchangeRatesImporter

Author: Adam Piotrowski ([email protected])
Afficher le fichier Open project: wellcommerce/wellcommerce

Protected Properties

Свойство Type Description
$currencyRepository WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface
$helper WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface
$managedCurrencies array
$ratesRepository WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface

Méthodes publiques

Méthode Description
__construct ( WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface $currencyRepository, WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface $ratesRepository, WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $helper ) Constructor

Méthodes protégées

Méthode Description
addUpdateExchangeRate ( string $currencyFrom, string $currencyTo, float $rate ) Adds new rate or updates existing one
formatExchangeRate ( float $rate ) : string Formats the exchange rate
getCurrencies ( ) : Currency[] Returns all currencies from repository
setManagedCurrencies ( ) Sets all managed currencies

Method Details

__construct() public méthode

Constructor
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

addUpdateExchangeRate() protected méthode

Adds new rate or updates existing one
protected addUpdateExchangeRate ( string $currencyFrom, string $currencyTo, float $rate )
$currencyFrom string
$currencyTo string
$rate float

formatExchangeRate() protected méthode

Formats the exchange rate
protected formatExchangeRate ( float $rate ) : string
$rate float
Résultat string

getCurrencies() protected méthode

Returns all currencies from repository
protected getCurrencies ( ) : Currency[]
Résultat WellCommerce\Bundle\CurrencyBundle\Entity\Currency[]

setManagedCurrencies() protected méthode

Sets all managed currencies
protected setManagedCurrencies ( )

Property Details

$currencyRepository protected_oe property

protected CurrencyRepositoryInterface,WellCommerce\Bundle\CurrencyBundle\Repository $currencyRepository
Résultat WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface

$helper protected_oe property

protected DoctrineHelperInterface,WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine $helper
Résultat WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface

$managedCurrencies protected_oe property

protected array $managedCurrencies
Résultat array

$ratesRepository protected_oe property

protected CurrencyRateRepositoryInterface,WellCommerce\Bundle\CurrencyBundle\Repository $ratesRepository
Résultat WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface