allow custom export repositories (#2182)

This commit is contained in:
Kevin Papst
2020-12-10 15:00:14 +01:00
committed by GitHub
parent c3fe8d1c39
commit 7a3388646b
18 changed files with 320 additions and 72 deletions

View 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;
}