static function CurrencyExchangerFixedRates::loadAll in Currency 7.2
Loads all available exchange rates.
Return value
array The array structure is identical to the return value of self::loadMultiple().
2 calls to CurrencyExchangerFixedRates::loadAll()
- CurrencyExchangerFixedRates::load in currency/
includes/ CurrencyExchangerFixedRates.inc - Implements CurrencyExchangerInterface::load().
- currency_currency_exchanger_fixed_rates_overview in currency/
currency.module - Displays CurrencyExchangerFixedRates' exchange rate overview.
File
- currency/
includes/ CurrencyExchangerFixedRates.inc, line 51 - Contains class CurrencyExchangerFixedRates.
Class
- CurrencyExchangerFixedRates
- Provides manually entered exchange rates.
Code
static function loadAll() {
$rates =& drupal_static(__CLASS__);
if (is_null($rates)) {
$rates = array();
$result = db_select('currency_exchanger_fixed_rates', 'ccfr')
->fields('ccfr')
->execute();
foreach ($result as $row) {
$rates[$row->currency_code_from][$row->currency_code_to] = $row->rate;
}
}
return $rates;
}