1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

Added some methods in the HandlerInterface and some typehints

This commit is contained in:
Christophe Coevoet
2011-03-19 23:07:44 +01:00
parent fb503eebf2
commit 3a3c96d6d7
6 changed files with 56 additions and 14 deletions

View File

@@ -12,6 +12,7 @@
namespace Monolog\Handler;
use Monolog\Logger;
use Monolog\Formatter\FormatterInterface;
use Monolog\Formatter\LineFormatter;
/**
@@ -35,12 +36,12 @@ abstract class AbstractHandler implements HandlerInterface
$this->bubble = $bubble;
}
public function isHandling($record)
public function isHandling(array $record)
{
return $record['level'] >= $this->level;
}
public function handle($record)
public function handle(array $record)
{
if ($record['level'] < $this->level) {
return false;
@@ -61,7 +62,7 @@ abstract class AbstractHandler implements HandlerInterface
return false === $this->bubble;
}
abstract public function write($record);
abstract public function write(array $record);
public function close()
{
@@ -77,7 +78,7 @@ abstract class AbstractHandler implements HandlerInterface
return array_shift($this->processors);
}
public function setFormatter($formatter)
public function setFormatter(FormatterInterface $formatter)
{
$this->formatter = $formatter;
}