"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php" between
glpi-9.3.3.tgz and glpi-9.4.0.tgz

About: GLPI is an IT and asset management software (Information Resource Manager).

GroupHandler.php  (glpi-9.3.3.tgz):GroupHandler.php  (glpi-9.4.0.tgz)
skipping to change at line 15 skipping to change at line 15
* *
* (c) Jordi Boggiano <j.boggiano@seld.be> * (c) Jordi Boggiano <j.boggiano@seld.be>
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Monolog\Handler; namespace Monolog\Handler;
use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\FormatterInterface;
use Monolog\ResettableInterface;
/** /**
* Forwards records to multiple handlers * Forwards records to multiple handlers
* *
* @author Lenar Lõhmus <lenar@city.ee> * @author Lenar Lõhmus <lenar@city.ee>
*/ */
class GroupHandler extends AbstractHandler class GroupHandler extends AbstractHandler
{ {
protected $handlers; protected $handlers;
/** /**
* @param array $handlers Array of Handlers. * @param array $handlers Array of Handlers.
* @param Boolean $bubble Whether the messages that are handled can bubble * @param bool $bubble Whether the messages that are handled can bubble u
up the stack or not p the stack or not
*/ */
public function __construct(array $handlers, $bubble = true) public function __construct(array $handlers, $bubble = true)
{ {
foreach ($handlers as $handler) { foreach ($handlers as $handler) {
if (!$handler instanceof HandlerInterface) { if (!$handler instanceof HandlerInterface) {
throw new \InvalidArgumentException('The first argument of the G roupHandler must be an array of HandlerInterface instances.'); throw new \InvalidArgumentException('The first argument of the G roupHandler must be an array of HandlerInterface instances.');
} }
} }
$this->handlers = $handlers; $this->handlers = $handlers;
skipping to change at line 93 skipping to change at line 94
} }
} }
$records = $processed; $records = $processed;
} }
foreach ($this->handlers as $handler) { foreach ($this->handlers as $handler) {
$handler->handleBatch($records); $handler->handleBatch($records);
} }
} }
public function reset()
{
parent::reset();
foreach ($this->handlers as $handler) {
if ($handler instanceof ResettableInterface) {
$handler->reset();
}
}
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function setFormatter(FormatterInterface $formatter) public function setFormatter(FormatterInterface $formatter)
{ {
foreach ($this->handlers as $handler) { foreach ($this->handlers as $handler) {
$handler->setFormatter($formatter); $handler->setFormatter($formatter);
} }
return $this; return $this;
 End of changes. 3 change blocks. 
3 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)