ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
12 namespace Monolog\Handler;
13 
16 
35 {
39  protected $handler;
40 
46  {
47  $this->handler = $handler;
48  }
49 
53  public function isHandling(array $record)
54  {
55  return $this->handler->isHandling($record);
56  }
57 
61  public function handle(array $record)
62  {
63  return $this->handler->handle($record);
64  }
65 
69  public function handleBatch(array $records)
70  {
71  return $this->handler->handleBatch($records);
72  }
73 
77  public function pushProcessor($callback)
78  {
79  $this->handler->pushProcessor($callback);
80 
81  return $this;
82  }
83 
87  public function popProcessor()
88  {
89  return $this->handler->popProcessor();
90  }
91 
95  public function setFormatter(FormatterInterface $formatter)
96  {
97  $this->handler->setFormatter($formatter);
98 
99  return $this;
100  }
101 
105  public function getFormatter()
106  {
107  return $this->handler->getFormatter();
108  }
109 
110  public function reset()
111  {
112  if ($this->handler instanceof ResettableInterface) {
113  return $this->handler->reset();
114  }
115  }
116 }
__construct(HandlerInterface $handler)
HandlerWrapper constructor.
Handler or Processor implementing this interface will be reset when Logger::reset() is called...
$records
Definition: simple_test.php:22
popProcessor()
{Removes the processor on top of the stack and returns it.callable}
setFormatter(FormatterInterface $formatter)
{Sets the formatter.self}
pushProcessor($callback)
{Adds a processor in the stack.self}
handleBatch(array $records)
{Handles a set of records at once.The records to handle (an array of record arrays)} ...
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 ...
Interface that all Monolog Handlers must implement.
getFormatter()
{Gets the formatter.FormatterInterface}
handle(array $record)
{Handles a record.All records may be passed to this method, and the handler should discard those that...