ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
HandlerWrapper.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
32{
36 protected $handler;
37
43 {
44 $this->handler = $handler;
45 }
46
50 public function isHandling(array $record)
51 {
52 return $this->handler->isHandling($record);
53 }
54
58 public function handle(array $record)
59 {
60 return $this->handler->handle($record);
61 }
62
66 public function handleBatch(array $records)
67 {
68 return $this->handler->handleBatch($records);
69 }
70
74 public function pushProcessor($callback)
75 {
76 $this->handler->pushProcessor($callback);
77
78 return $this;
79 }
80
84 public function popProcessor()
85 {
86 return $this->handler->popProcessor();
87 }
88
92 public function setFormatter(FormatterInterface $formatter)
93 {
94 $this->handler->setFormatter($formatter);
95
96 return $this;
97 }
98
102 public function getFormatter()
103 {
104 return $this->handler->getFormatter();
105 }
106}
An exception for terminatinating execution or to throw for unit testing.
This simple wrapper class can be used to extend handlers functionality.
isHandling(array $record)
{Checks whether the given record will be handled by this handler.This is mostly done for performance ...
handle(array $record)
{Handles a record.All records may be passed to this method, and the handler should discard those that...
setFormatter(FormatterInterface $formatter)
{Sets the formatter.self}
pushProcessor($callback)
{Adds a processor in the stack.self}
__construct(HandlerInterface $handler)
HandlerWrapper constructor.
popProcessor()
{Removes the processor on top of the stack and returns it.callable}
getFormatter()
{Gets the formatter.FormatterInterface}
handleBatch(array $records)
{Handles a set of records at once.}
Interface that all Monolog Handlers must implement.
$records
Definition: simple_test.php:22