diff options
Diffstat (limited to 'src/Monolog/Handler/HandlerInterface.php')
-rw-r--r-- | src/Monolog/Handler/HandlerInterface.php | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/Monolog/Handler/HandlerInterface.php b/src/Monolog/Handler/HandlerInterface.php index d920c4b..472fd31 100644 --- a/src/Monolog/Handler/HandlerInterface.php +++ b/src/Monolog/Handler/HandlerInterface.php @@ -1,4 +1,4 @@ -<?php +<?php declare(strict_types=1); /* * This file is part of the Monolog package. @@ -11,8 +11,6 @@ namespace Monolog\Handler; -use Monolog\Formatter\FormatterInterface; - /** * Interface that all Monolog Handlers must implement * @@ -33,7 +31,7 @@ interface HandlerInterface * * @return Boolean */ - public function isHandling(array $record); + public function isHandling(array $record): bool; /** * Handles a record. @@ -49,7 +47,7 @@ interface HandlerInterface * @return Boolean true means that this handler handled the record, and that bubbling is not permitted. * false means the record was either not processed or that this handler allows bubbling. */ - public function handle(array $record); + public function handle(array $record): bool; /** * Handles a set of records at once. @@ -59,32 +57,12 @@ interface HandlerInterface public function handleBatch(array $records); /** - * Adds a processor in the stack. - * - * @param callable $callback - * @return self - */ - public function pushProcessor($callback); - - /** - * Removes the processor on top of the stack and returns it. - * - * @return callable - */ - public function popProcessor(); - - /** - * Sets the formatter. + * Closes the handler. * - * @param FormatterInterface $formatter - * @return self - */ - public function setFormatter(FormatterInterface $formatter); - - /** - * Gets the formatter. + * This will be called automatically when the object is destroyed if you extend Monolog\Handler\Handler * - * @return FormatterInterface + * Implementations have to be idempotent (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 getFormatter(); + public function close(); } |