2014-09-20 08:39:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Firefly\Helper\Controllers;
|
|
|
|
use Illuminate\Support\MessageBag;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface TransactionInterface
|
|
|
|
*
|
|
|
|
* @package Firefly\Helper\Controllers
|
|
|
|
*/
|
|
|
|
interface TransactionInterface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Store a full transaction journal and associated stuff
|
|
|
|
*
|
|
|
|
* @param array $data
|
|
|
|
*
|
2014-09-21 15:40:41 +02:00
|
|
|
* @return MessageBag|\TransactionJournal
|
2014-09-20 08:39:24 +02:00
|
|
|
*/
|
|
|
|
public function store(array $data);
|
|
|
|
|
2014-10-05 08:27:18 +02:00
|
|
|
/**
|
|
|
|
* Returns messages about the validation.
|
|
|
|
*
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function validate(array $data);
|
|
|
|
|
2014-09-21 15:40:41 +02:00
|
|
|
/**
|
|
|
|
* @param \TransactionJournal $journal
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return MessageBag|\TransactionJournal
|
|
|
|
*/
|
|
|
|
public function update(\TransactionJournal $journal, array $data);
|
|
|
|
|
2014-09-21 08:25:30 +02:00
|
|
|
/**
|
|
|
|
* Overrule the user used when the class is created.
|
|
|
|
*
|
|
|
|
* @param \User $user
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function overruleUser(\User $user);
|
|
|
|
|
2014-09-20 08:39:24 +02:00
|
|
|
}
|