1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Split interfaces and base/abstract classes into more sensible pieces

This commit is contained in:
Jordi Boggiano
2015-10-09 20:41:09 +01:00
parent 39f8a20e6d
commit 902c0c8694
17 changed files with 356 additions and 209 deletions

View File

@@ -11,8 +11,6 @@
namespace Monolog\Handler;
use Monolog\Formatter\FormatterInterface;
/**
* Interface that all Monolog Handlers must implement
*
@@ -59,32 +57,12 @@ interface HandlerInterface
public function handleBatch(array $records);
/**
* Adds a processor in the stack.
* Closes the handler.
*
* @param callable $callback
* @return self
*/
public function pushProcessor($callback);
/**
* Removes the processor on top of the stack and returns it.
* This will be called automatically when the object is destroyed if you extend Monolog\Handler\Handler
*
* @return callable
* Implementations have to be indempotent (i.e. it should be possible to call close several times without breakage)
* and ideally handlers should be able to reopen themselves on handle() after they have been closed.
*/
public function popProcessor();
/**
* Sets the formatter.
*
* @param FormatterInterface $formatter
* @return self
*/
public function setFormatter(FormatterInterface $formatter);
/**
* Gets the formatter.
*
* @return FormatterInterface
*/
public function getFormatter();
public function close();
}