mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-10 23:24:02 +02:00
Fix CS and add chainability to a few more setter methods, refs #221
This commit is contained in:
@@ -77,6 +77,8 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given');
|
||||
}
|
||||
array_unshift($this->processors, $callback);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -117,10 +119,13 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
* Sets minimum logging level at which this handler will be triggered.
|
||||
*
|
||||
* @param integer $level
|
||||
* @return self
|
||||
*/
|
||||
public function setLevel($level)
|
||||
{
|
||||
$this->level = $level;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,10 +143,13 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
*
|
||||
* @param Boolean $bubble True means that bubbling is not permitted.
|
||||
* False means that this handler allows bubbling.
|
||||
* @return self
|
||||
*/
|
||||
public function setBubble($bubble)
|
||||
{
|
||||
$this->bubble = $bubble;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -62,6 +62,7 @@ interface HandlerInterface
|
||||
* Adds a processor in the stack.
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return self
|
||||
*/
|
||||
public function pushProcessor($callback);
|
||||
|
||||
@@ -76,6 +77,7 @@ interface HandlerInterface
|
||||
* Sets the formatter.
|
||||
*
|
||||
* @param FormatterInterface $formatter
|
||||
* @return self
|
||||
*/
|
||||
public function setFormatter(FormatterInterface $formatter);
|
||||
|
||||
|
Reference in New Issue
Block a user