1 | <?php |
||
11 | class LogService |
||
12 | { |
||
13 | /** @var Finder */ |
||
14 | private $finder; |
||
15 | |||
16 | /** @var Config */ |
||
17 | private $config; |
||
18 | |||
19 | /** @var FileManager */ |
||
20 | private $files; |
||
21 | |||
22 | /** |
||
23 | * LogService constructor. |
||
24 | * |
||
25 | * @param Finder $finder |
||
26 | * @param Config $config |
||
27 | * @param FileManager $files |
||
28 | */ |
||
29 | public function __construct(Finder $finder, Config $config, FileManager $files) |
||
35 | |||
36 | /** |
||
37 | * @return array |
||
38 | */ |
||
39 | public function getLogs(): array |
||
51 | |||
52 | /** |
||
53 | * @return null|LogFile |
||
54 | */ |
||
55 | public function lastLog() |
||
72 | |||
73 | /** |
||
74 | * @param string $filename |
||
75 | * @return null|LogFile |
||
76 | */ |
||
77 | public function getLogByName(string $filename) |
||
89 | |||
90 | /** |
||
91 | * @param LogFile $filename |
||
92 | */ |
||
93 | public function removeLog(LogFile $filename) |
||
105 | |||
106 | /** |
||
107 | * |
||
108 | */ |
||
109 | public function removeAll() |
||
116 | } |