1 | <?php |
||
12 | class HttpPingMonitor extends BaseMonitor |
||
13 | { |
||
14 | /** @var int */ |
||
15 | protected $responseCode; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $responseContent; |
||
19 | |||
20 | /** @var bool */ |
||
21 | protected $responseContainsPhrase = false; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $url; |
||
25 | |||
26 | /** @var bool|string */ |
||
27 | protected $checkPhrase = false; |
||
28 | |||
29 | /** @var int */ |
||
30 | protected $timeout = 5; |
||
31 | |||
32 | /** @var bool */ |
||
33 | protected $allowRedirects = true; |
||
34 | |||
35 | /** |
||
36 | * @param array $config |
||
37 | */ |
||
38 | public function __construct(array $config) |
||
56 | |||
57 | /** |
||
58 | * @throws InvalidConfiguration |
||
59 | */ |
||
60 | public function runMonitor() |
||
87 | |||
88 | protected function checkResponseContains($html, $phrase) |
||
98 | |||
99 | public function getResponseContainsPhrase() |
||
103 | |||
104 | public function getCheckPhrase() |
||
108 | |||
109 | public function getResponseCode() |
||
113 | |||
114 | public function getResponseContent() |
||
118 | |||
119 | public function getUrl() |
||
123 | } |
||
124 |