2016-02-04 10:16:16 -06:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* ExportJobRepositoryInterface.php
|
2016-04-01 09:44:46 -05:00
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
2016-02-04 10:16:16 -06:00
|
|
|
*
|
2016-10-04 23:52:15 -05:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-02-04 10:16:16 -06:00
|
|
|
*/
|
|
|
|
|
2016-05-20 05:41:23 -05:00
|
|
|
declare(strict_types = 1);
|
|
|
|
|
2016-02-04 10:16:16 -06:00
|
|
|
namespace FireflyIII\Repositories\ExportJob;
|
|
|
|
|
|
|
|
use FireflyIII\Models\ExportJob;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface ExportJobRepositoryInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Repositories\ExportJob
|
|
|
|
*/
|
|
|
|
interface ExportJobRepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @return bool
|
|
|
|
*/
|
2016-04-05 15:00:03 -05:00
|
|
|
public function cleanup(): bool;
|
2016-02-04 10:16:16 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ExportJob
|
|
|
|
*/
|
2016-04-05 15:00:03 -05:00
|
|
|
public function create(): ExportJob;
|
2016-02-04 10:16:16 -06:00
|
|
|
|
2016-12-27 08:46:52 -06:00
|
|
|
/**
|
|
|
|
* @param ExportJob $job
|
|
|
|
* @param string $status
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function changeStatus(ExportJob $job, string $status): bool;
|
|
|
|
|
2016-12-25 05:55:22 -06:00
|
|
|
/**
|
|
|
|
* @param ExportJob $job
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function exists(ExportJob $job): bool;
|
|
|
|
|
2016-02-04 10:16:16 -06:00
|
|
|
/**
|
2016-02-05 02:25:15 -06:00
|
|
|
* @param string $key
|
2016-02-04 10:16:16 -06:00
|
|
|
*
|
|
|
|
* @return ExportJob|null
|
|
|
|
*/
|
2016-04-05 15:00:03 -05:00
|
|
|
public function findByKey(string $key): ExportJob;
|
2016-02-04 10:16:16 -06:00
|
|
|
|
2016-12-25 05:55:22 -06:00
|
|
|
/**
|
|
|
|
* @param ExportJob $job
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getContent(ExportJob $job): string;
|
|
|
|
|
2016-02-10 09:01:18 -06:00
|
|
|
}
|