2016-01-13 11:34:56 -06:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* RuleRepositoryInterface.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\Repositories\Rule;
|
|
|
|
|
2016-01-14 02:38:48 -06:00
|
|
|
use FireflyIII\Models\Rule;
|
2016-01-13 11:34:56 -06:00
|
|
|
use FireflyIII\Models\RuleGroup;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface RuleRepositoryInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Repositories\Rule
|
|
|
|
*/
|
|
|
|
interface RuleRepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return RuleGroup
|
|
|
|
*/
|
|
|
|
public function storeRuleGroup(array $data);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getHighestOrderRuleGroup();
|
|
|
|
|
2016-01-13 11:50:15 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param RuleGroup $ruleGroup
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return RuleGroup
|
|
|
|
*/
|
2016-01-13 14:44:26 -06:00
|
|
|
public function updateRuleGroup(RuleGroup $ruleGroup, array $data);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param RuleGroup $ruleGroup
|
|
|
|
*
|
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public function destroyRuleGroup(RuleGroup $ruleGroup);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function resetRuleGroupOrder();
|
2016-01-13 11:50:15 -06:00
|
|
|
|
2016-01-14 02:38:48 -06:00
|
|
|
/**
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function resetRulesInGroupOrder(RuleGroup $ruleGroup);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Rule $rule
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function moveRuleUp(Rule $rule);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param Rule $rule
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function moveRuleDown(Rule $rule);
|
|
|
|
|
2016-01-14 02:53:59 -06:00
|
|
|
/**
|
|
|
|
* @param RuleGroup $ruleGroup
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function moveRuleGroupUp(RuleGroup $ruleGroup);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param RuleGroup $ruleGroup
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function moveRuleGroupDown(RuleGroup $ruleGroup);
|
|
|
|
|
2016-01-13 11:34:56 -06:00
|
|
|
}
|