ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
MailHandler.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <j.boggiano@seld.be>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Monolog\Handler;
13
20{
24 public function handleBatch(array $records)
25 {
26 $messages = array();
27
28 foreach ($records as $record) {
29 if ($record['level'] < $this->level) {
30 continue;
31 }
32 $messages[] = $this->processRecord($record);
33 }
34
35 if (!empty($messages)) {
36 $this->send((string) $this->getFormatter()->formatBatch($messages), $messages);
37 }
38 }
39
46 abstract protected function send($content, array $records);
47
51 protected function write(array $record)
52 {
53 $this->send((string) $record['formatted'], array($record));
54 }
55}
getFormatter()
{Gets the formatter.FormatterInterface}
Base Handler class providing the Handler structure.
processRecord(array $record)
Processes a record.
Base class for all mail handlers.
Definition: MailHandler.php:20
handleBatch(array $records)
{{Handles a set of records at once.}}
Definition: MailHandler.php:24
send($content, array $records)
Send a mail with the given content.
write(array $record)
{Writes the record down to the log of the implementing handler.void}
Definition: MailHandler.php:51
$messages
Definition: en-x-test.php:7
$records
Definition: simple_test.php:17