1 | <?php |
||
17 | final class RebuildProjectionsCommand extends Command |
||
18 | { |
||
19 | /** |
||
20 | * The name and signature of the console command. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $signature = 'smoothphp:rebuild'; |
||
25 | |||
26 | /** |
||
27 | * The console command description. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $description = 'Rebuild all projection'; |
||
32 | |||
33 | /** @var Repository */ |
||
34 | private $config; |
||
35 | |||
36 | /** |
||
37 | * @var EventDispatcher |
||
38 | */ |
||
39 | private $dispatcher; |
||
40 | |||
41 | /** @var DatabaseManager */ |
||
42 | private $databaseManager; |
||
43 | |||
44 | /** @var Serializer */ |
||
45 | private $serializer; |
||
46 | |||
47 | |||
48 | /** |
||
49 | * BuildLaravelEventStore constructor. |
||
50 | * @param Repository $config |
||
51 | * @param Application $application |
||
52 | * @param DatabaseManager $databaseManager |
||
53 | * @param Serializer $serializer |
||
54 | */ |
||
55 | public function __construct( |
||
68 | |||
69 | /** |
||
70 | * Execute the console command. |
||
71 | * |
||
72 | * @return mixed |
||
73 | */ |
||
74 | public function handle() |
||
94 | |||
95 | /** |
||
96 | * |
||
97 | */ |
||
98 | protected function replayEvents() |
||
119 | |||
120 | /** |
||
121 | * @param $start |
||
122 | * @param $take |
||
123 | * @return \stdClass |
||
124 | */ |
||
125 | private function getFromEventStore($start, $take) |
||
134 | |||
135 | /** |
||
136 | * @return int |
||
137 | */ |
||
138 | private function getEventCount() |
||
145 | |||
146 | /** |
||
147 | * @param $eventRow |
||
148 | */ |
||
149 | protected function dispatchEvent($eventRow) |
||
165 | } |
||
166 |