1 | <?php |
||
12 | final class AppendToStreamRequestFactory implements RequestFactoryInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var StreamId |
||
16 | */ |
||
17 | private $streamId; |
||
18 | |||
19 | /** |
||
20 | * @var ExpectedVersion |
||
21 | */ |
||
22 | private $expectedVersion; |
||
23 | |||
24 | /** |
||
25 | * @var EventDataCollection |
||
26 | */ |
||
27 | private $events; |
||
28 | |||
29 | /** |
||
30 | * @param StreamId $streamId |
||
31 | * @param ExpectedVersion $expectedVersion |
||
32 | * @param EventDataCollection $events |
||
33 | */ |
||
34 | public function __construct(StreamId $streamId, ExpectedVersion $expectedVersion, EventDataCollection $events) |
||
43 | |||
44 | /** |
||
45 | * @return RequestInterface |
||
46 | */ |
||
47 | public function buildRequest(): RequestInterface |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | private function buildBody(): string |
||
78 | } |
||
79 |