2017-12-16 19:47:14 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* RoutineInterface.php
|
2020-02-05 05:53:12 +01:00
|
|
|
* Copyright (c) 2019 james@firefly-iii.org
|
2017-12-16 19:47:14 +01:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
2017-12-16 19:47:14 +01:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
2017-12-16 19:47:14 +01:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2017-12-16 19:47:14 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2019-10-02 06:37:26 +02:00
|
|
|
* GNU Affero General Public License for more details.
|
2017-12-16 19:47:14 +01:00
|
|
|
*
|
2019-10-02 06:37:26 +02:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2017-12-16 19:47:14 +01:00
|
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace FireflyIII\Import\Routine;
|
|
|
|
|
2018-04-29 21:20:06 +02:00
|
|
|
use FireflyIII\Exceptions\FireflyException;
|
2017-12-16 19:47:14 +01:00
|
|
|
use FireflyIII\Models\ImportJob;
|
|
|
|
|
2017-12-17 14:30:53 +01:00
|
|
|
/**
|
|
|
|
* Interface RoutineInterface
|
2020-03-15 15:31:51 +01:00
|
|
|
* @deprecated
|
|
|
|
* @codeCoverageIgnore
|
2017-12-17 14:30:53 +01:00
|
|
|
*/
|
2017-12-16 19:47:14 +01:00
|
|
|
interface RoutineInterface
|
|
|
|
{
|
|
|
|
/**
|
2018-05-01 20:47:38 +02:00
|
|
|
* At the end of each run(), the import routine must set the job to the expected status.
|
|
|
|
*
|
|
|
|
* The final status of the routine must be "provider_finished".
|
|
|
|
*
|
2018-04-29 21:20:06 +02:00
|
|
|
* @throws FireflyException
|
2017-12-16 19:47:14 +01:00
|
|
|
*/
|
2018-04-29 21:20:06 +02:00
|
|
|
public function run(): void;
|
2017-12-16 19:47:14 +01:00
|
|
|
|
|
|
|
/**
|
2018-07-22 15:08:56 +02:00
|
|
|
* Set the import job.
|
|
|
|
*
|
2018-05-12 15:50:01 +02:00
|
|
|
* @param ImportJob $importJob
|
2017-12-16 19:47:14 +01:00
|
|
|
*
|
2018-05-06 20:42:30 +02:00
|
|
|
* @return void
|
2017-12-16 19:47:14 +01:00
|
|
|
*/
|
2018-05-12 15:50:01 +02:00
|
|
|
public function setImportJob(ImportJob $importJob): void;
|
2017-12-16 19:47:14 +01:00
|
|
|
}
|