Skip to content

Firefly III: a personal finances manager

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

James Coleea6c54cad08d
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 @@
+<?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;
+ }
+
+
+}
\ 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
*/