mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
Expand specifix to have a property that determines whether they fire before anything happens, or after. Could be expanded to allow for even more fine-grained control. See issue #145
This commit is contained in:
44
app/Helpers/Csv/Specifix/Specifix.php
Normal file
44
app/Helpers/Csv/Specifix/Specifix.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Specifix.php
|
||||||
|
* Copyright (C) 2016 Sander Dorigo
|
||||||
|
*
|
||||||
|
* This software may be modified and distributed under the terms
|
||||||
|
* of the MIT license. See the LICENSE file for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace FireflyIII\Helpers\Csv\Specifix;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Specifix
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Helpers\Csv\Specifix
|
||||||
|
*/
|
||||||
|
class Specifix
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var int */
|
||||||
|
protected $processorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getProcessorType()
|
||||||
|
{
|
||||||
|
return $this->processorType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $processorType
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setProcessorType($processorType)
|
||||||
|
{
|
||||||
|
$this->processorType = $processorType;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -8,16 +8,30 @@ namespace FireflyIII\Helpers\Csv\Specifix;
|
|||||||
*/
|
*/
|
||||||
interface SpecifixInterface
|
interface SpecifixInterface
|
||||||
{
|
{
|
||||||
|
const PRE_PROCESSOR = 1;
|
||||||
|
const POST_PROCESSOR = 2;
|
||||||
/**
|
/**
|
||||||
* Implement bank and locale related fixes.
|
* Implement bank and locale related fixes.
|
||||||
*/
|
*/
|
||||||
public function fix();
|
public function fix();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getProcessorType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $data
|
* @param array $data
|
||||||
*/
|
*/
|
||||||
public function setData($data);
|
public function setData($data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $processorType
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setProcessorType($processorType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $row
|
* @param array $row
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user