2017-06-10 15:09:41 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* ConfigurationInterface.php
|
|
|
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
|
|
|
*
|
2017-10-21 08:40:00 +02:00
|
|
|
* This file is part of Firefly III.
|
|
|
|
*
|
|
|
|
* Firefly III is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Firefly III is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2017-12-17 14:44:05 +01:00
|
|
|
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
2017-06-10 15:09:41 +02:00
|
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace FireflyIII\Support\Import\Configuration;
|
|
|
|
|
|
|
|
use FireflyIII\Models\ImportJob;
|
|
|
|
|
|
|
|
/**
|
2017-11-15 12:25:49 +01:00
|
|
|
* Class ConfigurationInterface.
|
2017-06-10 15:09:41 +02:00
|
|
|
*/
|
|
|
|
interface ConfigurationInterface
|
|
|
|
{
|
|
|
|
/**
|
2017-06-12 19:12:07 +02:00
|
|
|
* Get the data necessary to show the configuration screen.
|
2017-06-10 15:09:41 +02:00
|
|
|
*
|
2017-06-12 19:12:07 +02:00
|
|
|
* @return array
|
2017-06-10 15:09:41 +02:00
|
|
|
*/
|
2017-06-12 19:12:07 +02:00
|
|
|
public function getData(): array;
|
2017-06-10 15:09:41 +02:00
|
|
|
|
2017-08-12 07:47:42 +02:00
|
|
|
/**
|
|
|
|
* Return possible warning to user.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getWarningMessage(): string;
|
|
|
|
|
2017-06-10 15:09:41 +02:00
|
|
|
/**
|
2017-06-12 19:12:07 +02:00
|
|
|
* @param ImportJob $job
|
2017-06-10 15:09:41 +02:00
|
|
|
*
|
2017-06-12 19:12:07 +02:00
|
|
|
* @return ConfigurationInterface
|
2017-06-10 15:09:41 +02:00
|
|
|
*/
|
2017-06-12 19:12:07 +02:00
|
|
|
public function setJob(ImportJob $job);
|
2017-06-10 15:09:41 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Store the result.
|
|
|
|
*
|
|
|
|
* @param array $data
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function storeConfiguration(array $data): bool;
|
2017-07-07 08:09:42 +02:00
|
|
|
}
|