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:
James Cole 2016-01-20 21:23:39 +01:00
parent 81287602d7
commit ea6c54cad0
2 changed files with 58 additions and 0 deletions

View 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;
}
}

View File

@ -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
*/