@@ -80,6 +80,9 @@ class ChunkService {
80
80
/** @var EncryptService */
81
81
private $ encryptService ;
82
82
83
+ /** @var OutputService */
84
+ private $ outputService ;
85
+
83
86
/** @var ConfigService */
84
87
private $ configService ;
85
88
@@ -89,15 +92,18 @@ class ChunkService {
89
92
*
90
93
* @param FilesService $filesService
91
94
* @param EncryptService $encryptService
95
+ * @param OutputService $outputService
92
96
* @param ConfigService $configService
93
97
*/
94
98
public function __construct (
95
99
FilesService $ filesService ,
96
100
EncryptService $ encryptService ,
101
+ OutputService $ outputService ,
97
102
ConfigService $ configService
98
103
) {
99
104
$ this ->filesService = $ filesService ;
100
105
$ this ->encryptService = $ encryptService ;
106
+ $ this ->outputService = $ outputService ;
101
107
$ this ->configService = $ configService ;
102
108
}
103
109
@@ -115,10 +121,12 @@ public function createChunks(RestoringPoint $point): void {
115
121
continue ;
116
122
}
117
123
124
+ $ this ->o (' * <info> ' . $ data ->getName () . '</info>: ' , false );
118
125
$ this ->filesService ->initRestoringData ($ data );
119
126
if (!$ data ->isLocked ()) {
120
127
$ this ->filesService ->fillRestoringData ($ data , $ data ->getUniqueFile ());
121
128
}
129
+ $ this ->o ($ data ->getRoot () . $ data ->getPath () . ', ' . count ($ data ->getFiles ()) . ' files ' );
122
130
$ data ->setLocked (true );
123
131
124
132
$ this ->fillChunks ($ point , $ data );
@@ -353,6 +361,7 @@ private function fillChunks(RestoringPoint $point, RestoringData $data) {
353
361
$ files = $ data ->getFiles ();
354
362
while (!empty ($ files )) {
355
363
$ archive = $ this ->generateChunk ($ point , $ data , $ files );
364
+ $ this ->o (' - ' . $ archive ->getName ());
356
365
$ this ->updateChecksum ($ point , $ archive );
357
366
358
367
$ data ->addChunk ($ archive );
@@ -978,4 +987,14 @@ public function getChunkFolder(
978
987
979
988
return $ folder ;
980
989
}
990
+
991
+
992
+ /**
993
+ * @param string $line
994
+ * @param bool $ln
995
+ */
996
+ private function o (string $ line , bool $ ln = true ): void {
997
+ $ this ->outputService ->o ($ line , $ ln );
998
+ }
999
+
981
1000
}
0 commit comments