firefly-iii/app/Helpers/Csv/Converter/CurrencyId.php

29 lines
610 B
PHP
Raw Normal View History

2015-07-05 08:16:44 -05:00
<?php
namespace FireflyIII\Helpers\Csv\Converter;
use FireflyIII\Models\TransactionCurrency;
/**
* Class CurrencyId
*
* @package FireflyIII\Helpers\Csv\Converter
*/
class CurrencyId extends BasicConverter implements ConverterInterface
{
/**
* @return mixed|static
*/
public function convert()
{
if (isset($this->mapped[$this->index][$this->value])) {
$currency = TransactionCurrency::find($this->mapped[$this->index][$this->value]);
} else {
$currency = TransactionCurrency::find($this->value);
}
return $currency;
}
2015-07-09 14:26:40 -05:00
}