Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
14 | interface EventStore |
||
15 | { |
||
16 | /** |
||
17 | * @param string $id |
||
18 | * @return DomainEventStream |
||
19 | * @throws EventStreamNotFound |
||
20 | */ |
||
21 | public function load(string $id) : DomainEventStream; |
||
22 | |||
23 | /** |
||
24 | * @param mixed $id |
||
25 | * @param DomainEventStream $eventStream |
||
26 | * @return void |
||
27 | */ |
||
28 | public function append(string $id, DomainEventStream $eventStream) : void; |
||
29 | |||
30 | /** |
||
31 | * @param string[] $eventTypes |
||
32 | * @return int |
||
33 | */ |
||
34 | public function getEventCountByTypes(array $eventTypes) : int; |
||
35 | |||
36 | /** |
||
37 | * @param string[] $eventTypes |
||
38 | * @param int $take |
||
39 | * @return \Generator |
||
40 | */ |
||
41 | public function getEventsByType(array $eventTypes, int $take) : \Generator; |
||
42 | |||
43 | /** |
||
44 | * @param string $streamId |
||
45 | */ |
||
46 | public function deleteStream(string $streamId) : void; |
||
47 | } |
||
48 |