1 | <?php |
||
15 | class BasicInfoAttachment extends Attachment |
||
16 | { |
||
17 | /** |
||
18 | * @var array The data from the error handler |
||
19 | */ |
||
20 | private $record; |
||
21 | |||
22 | /** |
||
23 | * Extra error data. |
||
24 | * |
||
25 | * @var ErrorInterface |
||
26 | */ |
||
27 | private $error; |
||
28 | |||
29 | /** |
||
30 | * BasicInfoAttachment constructor. |
||
31 | * |
||
32 | * @param array $record |
||
33 | * @param ErrorInterface $error |
||
34 | */ |
||
35 | 11 | public function __construct(array $record, ErrorInterface $error = null) |
|
57 | |||
58 | /** |
||
59 | * Check if a key is available in the record. If so, add it as a field. |
||
60 | * |
||
61 | * @param string $key |
||
62 | * @param string $label |
||
63 | */ |
||
64 | 11 | private function addRecordDataAsJsonEncodedField($key, $label) |
|
70 | |||
71 | /** |
||
72 | * Returned a Slack message attachment color associated with |
||
73 | * provided level. |
||
74 | * |
||
75 | * @return Colour |
||
76 | */ |
||
77 | 11 | private function getColourForLoggerLevel() |
|
90 | } |
||
91 |