PHP Класс WellCommerce\Bundle\CurrencyBundle\Importer\AbstractExchangeRatesImporter

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

Защищенные свойства (Protected)

Свойство Тип Описание
$currencyRepository WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface
$helper WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface
$managedCurrencies array
$ratesRepository WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface

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

Метод Описание
__construct ( WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface $currencyRepository, WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface $ratesRepository, WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $helper ) Constructor

Защищенные методы

Метод Описание
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

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

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

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() защищенный Метод

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

formatExchangeRate() защищенный Метод

Formats the exchange rate
protected formatExchangeRate ( float $rate ) : string
$rate float
Результат string

getCurrencies() защищенный Метод

Returns all currencies from repository
protected getCurrencies ( ) : Currency[]
Результат WellCommerce\Bundle\CurrencyBundle\Entity\Currency[]

setManagedCurrencies() защищенный Метод

Sets all managed currencies
protected setManagedCurrencies ( )

Описание свойств

$currencyRepository защищенное свойство

protected CurrencyRepositoryInterface,WellCommerce\Bundle\CurrencyBundle\Repository $currencyRepository
Результат WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRepositoryInterface

$helper защищенное свойство

protected DoctrineHelperInterface,WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine $helper
Результат WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface

$managedCurrencies защищенное свойство

protected array $managedCurrencies
Результат array

$ratesRepository защищенное свойство

protected CurrencyRateRepositoryInterface,WellCommerce\Bundle\CurrencyBundle\Repository $ratesRepository
Результат WellCommerce\Bundle\CurrencyBundle\Repository\CurrencyRateRepositoryInterface