1 | <?php |
||
19 | class EventStream |
||
20 | { |
||
21 | /** |
||
22 | * @var Connection |
||
23 | */ |
||
24 | protected $connection; |
||
25 | |||
26 | /** |
||
27 | * @var SerializerInterface |
||
28 | */ |
||
29 | protected $payloadSerializer; |
||
30 | |||
31 | /** |
||
32 | * @var SerializerInterface |
||
33 | */ |
||
34 | protected $metadataSerializer; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $tableName; |
||
40 | |||
41 | /** |
||
42 | * @var Statement |
||
43 | */ |
||
44 | protected $loadStatement; |
||
45 | |||
46 | /** |
||
47 | * @var int |
||
48 | */ |
||
49 | protected $previousId; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $primaryKey; |
||
55 | |||
56 | /** |
||
57 | * @var EventStreamDecoratorInterface |
||
58 | */ |
||
59 | private $domainEventStreamDecorator; |
||
60 | |||
61 | /** |
||
62 | * @param Connection $connection |
||
63 | * @param SerializerInterface $payloadSerializer |
||
64 | * @param SerializerInterface $metadataSerializer |
||
65 | * @param string $tableName |
||
66 | * @param int $startId |
||
67 | * @param string $primaryKey |
||
68 | */ |
||
69 | public function __construct( |
||
87 | |||
88 | /** |
||
89 | * @param EventStreamDecoratorInterface $domainEventStreamDecorator |
||
90 | * @return EventStream |
||
91 | */ |
||
92 | public function withDomainEventStreamDecorator(EventStreamDecoratorInterface $domainEventStreamDecorator) |
||
98 | |||
99 | public function __invoke() |
||
135 | |||
136 | /** |
||
137 | * @return int |
||
138 | */ |
||
139 | public function getPreviousId() |
||
143 | |||
144 | /** |
||
145 | * @return Statement |
||
146 | * @throws DBALException |
||
147 | */ |
||
148 | protected function prepareLoadStatement() |
||
163 | |||
164 | /** |
||
165 | * @param $row |
||
166 | * @return DomainMessage |
||
167 | */ |
||
168 | private function deserializeEvent($row) |
||
178 | } |
||
179 |