1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-25 10:36:33 +02:00
Files
php-monolog/src/Monolog/Handler/HandlerInterface.php
2011-03-19 23:26:12 +01:00

66 lines
1.3 KiB
PHP

<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monolog\Handler;
use Monolog\Formatter\FormatterInterface;
/**
* Interface that all Monolog Handlers must implement
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
interface HandlerInterface
{
/**
* Checks whether the handler handles the record.
*
* @return Boolean
*/
function isHandling(array $record);
/**
* Handles a record.
*
* @param array $record The record to handle
* @return Boolean Whether the handler stops the propagation in the stack or not.
*/
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();
}