1 | <?php declare(strict_types=1); |
||
14 | class ClimateLogger implements Logger |
||
15 | { |
||
16 | /** |
||
17 | * @var CLImate |
||
18 | */ |
||
19 | public $cliMate; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $scriptStartTime; |
||
25 | |||
26 | /** |
||
27 | * @var Duration |
||
28 | */ |
||
29 | private $duration; |
||
30 | |||
31 | /** |
||
32 | * @param CLImate $cliMate |
||
33 | * @param Duration $duration |
||
34 | */ |
||
35 | public function __construct(CLImate $cliMate, Duration $duration) |
||
40 | |||
41 | /** |
||
42 | * @param Script $script |
||
43 | */ |
||
44 | public function startScript(Script $script) |
||
49 | |||
50 | /** |
||
51 | * @param Script $script |
||
52 | */ |
||
53 | public function finishScript(Script $script) |
||
63 | |||
64 | /** |
||
65 | * @param string $response |
||
66 | * @return string |
||
67 | */ |
||
68 | private function formatOutput(string $response) :string |
||
72 | |||
73 | /** |
||
74 | * @return void |
||
75 | */ |
||
76 | public function logWait() |
||
80 | |||
81 | public function log(LogMessage $logMessage) |
||
89 | |||
90 | /** |
||
91 | * @param string $response |
||
92 | */ |
||
93 | private function err(string $response) |
||
97 | |||
98 | /** |
||
99 | * @param string $response |
||
100 | */ |
||
101 | private function out(string $response) |
||
105 | |||
106 | /** |
||
107 | * @param string $headline |
||
108 | * @param string $subject |
||
109 | * @param int $line |
||
110 | * @param bool $isIgnoreError |
||
111 | * @param int $index |
||
112 | * @param int $max |
||
113 | */ |
||
114 | public function logStart(string $headline, string $subject, int $line, bool $isIgnoreError, int $index, int $max) |
||
119 | |||
120 | public function logSuccess() |
||
124 | |||
125 | public function LogFailure() |
||
129 | } |
||
130 |