1 | <?php |
||
11 | abstract class AbstractMailReporter implements ReporterInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var array|string |
||
15 | */ |
||
16 | protected $recipients; |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $subject; |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $sender; |
||
25 | /** |
||
26 | * @var bool |
||
27 | */ |
||
28 | protected $sendOnWarning; |
||
29 | |||
30 | /** |
||
31 | * @param string|array $recipients |
||
32 | * @param string $sender |
||
33 | * @param string $subject |
||
34 | * @param bool $sendOnWarning |
||
35 | */ |
||
36 | public function __construct($recipients, $sender, $subject, $sendOnWarning = true) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function onStart(ArrayObject $checks, $runnerConfig) |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function onBeforeRun(CheckInterface $check, $checkAlias = null) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function onAfterRun(CheckInterface $check, ResultInterface $result, $checkAlias = null) |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function onStop(ResultsCollection $results) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function onFinish(ResultsCollection $results) |
||
95 | |||
96 | abstract protected function sendEmail(ResultsCollection $results); |
||
97 | } |
||
98 |