1 | <?php |
||
13 | abstract class AbstractMailReporter implements ReporterInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var array|string |
||
17 | */ |
||
18 | protected $recipients; |
||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $subject; |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $sender; |
||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | protected $sendOnWarning; |
||
31 | |||
32 | /** |
||
33 | * @param string|array $recipients |
||
34 | * @param string $sender |
||
35 | * @param string $subject |
||
36 | * @param bool $sendOnWarning |
||
37 | */ |
||
38 | public function __construct($recipients, $sender, $subject, $sendOnWarning = true) |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function onStart(ArrayObject $checks, $runnerConfig) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function onBeforeRun(CheckInterface $check, $checkAlias = null) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function onAfterRun(CheckInterface $check, ResultInterface $result, $checkAlias = null) |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function onStop(ResultsCollection $results) |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function onFinish(ResultsCollection $results) |
||
97 | |||
98 | abstract protected function sendEmail(ResultsCollection $results); |
||
99 | } |
||
100 |