ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
23{
27 public function handle(array $record)
28 {
29 if (!$this->isHandling($record)) {
30 return false;
31 }
32
33 $record = $this->processRecord($record);
34
35 $record['formatted'] = $this->getFormatter()->format($record);
36
37 $this->write($record);
38
39 return false === $this->bubble;
40 }
41
48 abstract protected function write(array $record);
49
56 protected function processRecord(array $record)
57 {
58 if ($this->processors) {
59 foreach ($this->processors as $processor) {
60 $record = call_user_func($processor, $record);
61 }
62 }
63
64 return $record;
65 }
66}
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.