allow custom export repositories (#2182)
This commit is contained in:
38
src/Export/ExportRepositoryInterface.php
Normal file
38
src/Export/ExportRepositoryInterface.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Export;
|
||||
|
||||
use App\Repository\Query\ExportQuery;
|
||||
|
||||
interface ExportRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* This method will receive ALL exported items, loaded from all repositories.
|
||||
* Be careful to only handle the ones, which belong to your repository.
|
||||
*
|
||||
* @param ExportItemInterface[] $items
|
||||
* @return void
|
||||
*/
|
||||
public function setExported(array $items): void;
|
||||
|
||||
/**
|
||||
* @param ExportQuery $query
|
||||
* @return ExportItemInterface[]
|
||||
*/
|
||||
public function getExportItemsForQuery(ExportQuery $query): iterable;
|
||||
|
||||
/**
|
||||
* Returns the type of this repository.
|
||||
* Must match the value returned by your entities via ExportItemInterface::getType().
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string;
|
||||
}
|
||||
Reference in New Issue
Block a user