1 | <?php |
||
12 | class AbstractParser implements JSONParserChainElementInterface, OutputContainerBearerInterface |
||
13 | { |
||
14 | /** @var OutputContainerInterface */ |
||
15 | protected $outputContainer; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $title; |
||
19 | |||
20 | /** @var string */ |
||
21 | protected $status; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $messageStartsWith; |
||
25 | |||
26 | /** |
||
27 | * AbstractParser constructor. |
||
28 | * |
||
29 | * @param OutputContainerInterface $outputContainer |
||
30 | * @param string $status The status that the parser should catch |
||
31 | * @param string | null $messageStartsWith The start of the message that the parser should look for |
||
32 | */ |
||
33 | 20 | public function __construct(OutputContainerInterface $outputContainer, $status, $messageStartsWith = null) |
|
39 | |||
40 | /** |
||
41 | * @return OutputContainerInterface |
||
42 | */ |
||
43 | 20 | public function getOutputContainer() |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 15 | public function parsingFoundResult(ProcessResultInterface $process, \stdClass $log) |
|
66 | |||
67 | /** |
||
68 | * @param \stdClass $log |
||
69 | * @return bool |
||
70 | */ |
||
71 | 15 | private function checkMessageStart(\stdClass $log) |
|
83 | |||
84 | /** |
||
85 | * @param \stdClass $log |
||
86 | * @return string |
||
87 | */ |
||
88 | 15 | private function createMessageFromLog(\stdClass $log) |
|
98 | } |
||
99 |