mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 10:06:08 +02:00
Added some methods in the HandlerInterface and some typehints
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Formatter\FormatterInterface;
|
||||
|
||||
/**
|
||||
* Interface that all Monolog Handlers must implement
|
||||
*
|
||||
@@ -18,7 +20,46 @@ namespace Monolog\Handler;
|
||||
*/
|
||||
interface HandlerInterface
|
||||
{
|
||||
public function isHandling($record);
|
||||
/**
|
||||
* Checks whether the handler handles the record.
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
public function isHandling(array $record);
|
||||
|
||||
public function handle($record);
|
||||
/**
|
||||
* Handles a record.
|
||||
*
|
||||
* @param array $record The record to handle
|
||||
* @return Boolean Whether the handler stops the propagation in the stack or not.
|
||||
*/
|
||||
public function handle(array $record);
|
||||
|
||||
/**
|
||||
* Adds a processor in the stack.
|
||||
*
|
||||
* @param callable $callback
|
||||
*/
|
||||
function pushProcessor($callback);
|
||||
|
||||
/**
|
||||
* Removes the processor on top of the stack and returns it.
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
function popProcessor();
|
||||
|
||||
/**
|
||||
* Sets the formatter.
|
||||
*
|
||||
* @param FormatterInterface $formatter
|
||||
*/
|
||||
function setFormatter(FormatterInterface $formatter);
|
||||
|
||||
/**
|
||||
* Gets the formatter.
|
||||
*
|
||||
* @return FormatterInterface
|
||||
*/
|
||||
function getFormatter();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user