| 1 | <?php |
||
| 12 | class JSONLogFetcher |
||
| 13 | { |
||
| 14 | const LOG_ENDING_STATUS = 'paraunitEnd'; |
||
| 15 | |||
| 16 | /** @var JSONLogFilename */ |
||
| 17 | private $fileName; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * JSONLogFetcher constructor. |
||
| 21 | * @param JSONLogFilename $fileName |
||
| 22 | */ |
||
| 23 | 23 | public function __construct(JSONLogFilename $fileName) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param ParaunitProcessInterface $process |
||
| 30 | * @return array |
||
| 31 | */ |
||
| 32 | 22 | public function fetch(ParaunitProcessInterface $process) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $jsonString The dirty output |
||
| 49 | * @return string The normalized log, as an array of JSON objects |
||
| 50 | */ |
||
| 51 | 22 | private static function cleanLog($jsonString) |
|
| 57 | |||
| 58 | 22 | private function createLogEnding() |
|
| 65 | } |
||
| 66 |