ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AbstractProcessingHandler.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
15
25{
29 public function handle(array $record)
30 {
31 if (!$this->isHandling($record)) {
32 return false;
33 }
34
35 $record = $this->processRecord($record);
36
37 $record['formatted'] = $this->getFormatter()->format($record);
38
39 $this->write($record);
40
41 return false === $this->bubble;
42 }
43
50 abstract protected function write(array $record);
51
58 protected function processRecord(array $record)
59 {
60 if ($this->processors) {
61 foreach ($this->processors as $processor) {
62 $record = call_user_func($processor, $record);
63 }
64 }
65
66 return $record;
67 }
68}
An exception for terminatinating execution or to throw for unit testing.
Base Handler class providing the Handler structure.
getFormatter()
{Gets the formatter.FormatterInterface}
isHandling(array $record)
{Checks whether the given record will be handled by this handler.This is mostly done for performance ...
Base Handler class providing the Handler structure.
handle(array $record)
{Handles a record.All records may be passed to this method, and the handler should discard those that...
processRecord(array $record)
Processes a record.
write(array $record)
Writes the record down to the log of the implementing handler.
Handler or Processor implementing this interface will be reset when Logger::reset() is called.