From ea6c54cad08d108acafcca657bde38966f973e65 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Jan 2016 21:23:39 +0100 Subject: [PATCH] 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 --- app/Helpers/Csv/Specifix/Specifix.php | 44 +++++++++++++++++++ .../Csv/Specifix/SpecifixInterface.php | 14 ++++++ 2 files changed, 58 insertions(+) create mode 100644 app/Helpers/Csv/Specifix/Specifix.php diff --git a/app/Helpers/Csv/Specifix/Specifix.php b/app/Helpers/Csv/Specifix/Specifix.php new file mode 100644 index 0000000000..627ba651ca --- /dev/null +++ b/app/Helpers/Csv/Specifix/Specifix.php @@ -0,0 +1,44 @@ +processorType; + } + + /** + * @param $processorType + * + * @return $this + */ + public function setProcessorType($processorType) + { + $this->processorType = $processorType; + + return $this; + } + + +} \ No newline at end of file diff --git a/app/Helpers/Csv/Specifix/SpecifixInterface.php b/app/Helpers/Csv/Specifix/SpecifixInterface.php index 142d224c4d..34e9a3e833 100644 --- a/app/Helpers/Csv/Specifix/SpecifixInterface.php +++ b/app/Helpers/Csv/Specifix/SpecifixInterface.php @@ -8,16 +8,30 @@ namespace FireflyIII\Helpers\Csv\Specifix; */ interface SpecifixInterface { + const PRE_PROCESSOR = 1; + const POST_PROCESSOR = 2; /** * Implement bank and locale related fixes. */ public function fix(); + /** + * @return int + */ + public function getProcessorType(); + /** * @param array $data */ public function setData($data); + /** + * @param int $processorType + * + * @return $this + */ + public function setProcessorType($processorType); + /** * @param array $row */