1 | <?php |
||
16 | class SwiftMailerReporter implements ReporterInterface |
||
17 | { |
||
18 | private $mailer; |
||
19 | private $recipient; |
||
20 | private $subject; |
||
21 | private $sender; |
||
22 | private $sendOnWarning; |
||
23 | |||
24 | /** |
||
25 | * @param Swift_Mailer $mailer |
||
26 | * @param string $recipient |
||
27 | * @param string $sender |
||
28 | * @param string $subject |
||
29 | * @param bool $sendOnWarning |
||
30 | */ |
||
31 | public function __construct(Swift_Mailer $mailer, $recipient, $sender, $subject, $sendOnWarning = true) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function onStart(ArrayObject $checks, $runnerConfig) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function onBeforeRun(CheckInterface $check, $checkAlias = null) |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function onAfterRun(CheckInterface $check, ResultInterface $result, $checkAlias = null) |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function onStop(ResultsCollection $results) |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function onFinish(ResultsCollection $results) |
||
91 | |||
92 | private function sendEmail(ResultsCollection $results) |
||
115 | } |
||
116 |