1 | <?php |
||
10 | final class InMemoryEventStore implements EventStore |
||
11 | { |
||
12 | /** |
||
13 | * Events in memory |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $events = []; |
||
17 | |||
18 | /** |
||
19 | * @param UncommittedEvents $stream |
||
20 | * @return CommittedEvents |
||
21 | */ |
||
22 | public function commit(UncommittedEvents $stream) |
||
32 | |||
33 | /** |
||
34 | * Gets the events stored as memory and wraps it in \CommittedEvents |
||
35 | * |
||
36 | * @param Identity $id |
||
37 | * @param int $offset |
||
38 | * @param null $max |
||
39 | * @return CommittedEvents |
||
40 | */ |
||
41 | public function getAggregateHistoryFor(Identity $id, $offset = 0, $max = null) |
||
53 | } |
||
54 |