1 | <?php |
||
11 | class WebhookAlerter implements AlerterInterface |
||
12 | { |
||
13 | protected $client; |
||
14 | protected $uris = []; |
||
15 | protected $logger; |
||
16 | |||
17 | /** |
||
18 | * Set the guzzle http client |
||
19 | * |
||
20 | * @param Client $client |
||
21 | */ |
||
22 | 3 | public function setHttpClient(Client $client) |
|
26 | |||
27 | /** |
||
28 | * Add a uri to call when an alert is raised |
||
29 | * |
||
30 | * @param string $uri |
||
31 | */ |
||
32 | 3 | public function addUri($uri) |
|
36 | |||
37 | /** |
||
38 | * Set the logger |
||
39 | * |
||
40 | * @param LoggerInterface $logger |
||
41 | */ |
||
42 | public function setLogger(LoggerInterface $logger) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 3 | public function alert(Alert $alert) |
|
75 | } |
||
76 |