-
-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathDataProviderInterface.php
More file actions
40 lines (33 loc) · 1.07 KB
/
DataProviderInterface.php
File metadata and controls
40 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
namespace Setono\SyliusFeedPlugin\DataProvider;
use Setono\DoctrineORMBatcher\Batch\BatchInterface;
use Setono\DoctrineORMBatcher\Batch\CollectionBatchInterface;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Locale\Model\LocaleInterface;
use Sylius\Component\Resource\Model\ResourceInterface;
interface DataProviderInterface
{
/**
* This will be the root class of the data provided by this data provider
*
* @return class-string
*/
public function getClass(): string;
/**
* Will return an iterable of ids
*
* @return iterable<CollectionBatchInterface>
*/
public function getBatches(ChannelInterface $channel, LocaleInterface $locale): iterable;
/**
* Returns the number of batches
*/
public function getBatchCount(ChannelInterface $channel, LocaleInterface $locale): int;
/**
* This will return the items based on the given batch
*
* @return ResourceInterface[]
*/
public function getItems(BatchInterface $batch): iterable;
}