mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
115 lines
1.9 KiB
PHP
115 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* BasicConverter.php
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
*
|
|
* This software may be modified and distributed under the terms
|
|
* of the MIT license. See the LICENSE file for details.
|
|
*/
|
|
|
|
declare(strict_types = 1);
|
|
namespace FireflyIII\Helpers\Csv\Converter;
|
|
|
|
/**
|
|
* Class BasicConverter
|
|
*
|
|
*
|
|
* @SuppressWarnings(PHPMD.NumberOfChildren)
|
|
* @package FireflyIII\Helpers\Csv\Converter
|
|
*/
|
|
class BasicConverter
|
|
{
|
|
/** @var array */
|
|
protected $data;
|
|
/** @var string */
|
|
protected $field;
|
|
/** @var int */
|
|
protected $index;
|
|
/** @var array */
|
|
protected $mapped;
|
|
/** @var string */
|
|
protected $value;
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function getData(): array
|
|
{
|
|
return $this->data;
|
|
}
|
|
|
|
/**
|
|
* @param array $data
|
|
*/
|
|
public function setData(array $data)
|
|
{
|
|
$this->data = $data;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getField(): string
|
|
{
|
|
return $this->field;
|
|
}
|
|
|
|
/**
|
|
* @param string $field
|
|
*/
|
|
public function setField(string $field)
|
|
{
|
|
$this->field = $field;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getIndex(): int
|
|
{
|
|
return $this->index;
|
|
}
|
|
|
|
/**
|
|
* @param int $index
|
|
*/
|
|
public function setIndex(int $index)
|
|
{
|
|
$this->index = $index;
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function getMapped(): array
|
|
{
|
|
return $this->mapped;
|
|
}
|
|
|
|
/**
|
|
* @param array $mapped
|
|
*/
|
|
public function setMapped(array $mapped)
|
|
{
|
|
$this->mapped = $mapped;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getValue(): string
|
|
{
|
|
return $this->value;
|
|
}
|
|
|
|
/**
|
|
* @param string $value
|
|
*/
|
|
public function setValue(string $value)
|
|
{
|
|
$this->value = $value;
|
|
}
|
|
|
|
|
|
}
|