ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
12 namespace 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.
Base Handler class providing the Handler structure.
write(array $record)
Writes the record down to the log of the implementing handler.
handle(array $record)
{Handles a record.All records may be passed to this method, and the handler should discard those that...
getFormatter()
{Gets the formatter.FormatterInterface}
Create styles array
The data for the language used.
isHandling(array $record)
{Checks whether the given record will be handled by this handler.This is mostly done for performance ...
processRecord(array $record)
Processes a record.