* * @phpstan-import-type Record from \Monolog\Logger */ class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface { use ProcessableHandlerTrait; /** @var HandlerInterface[] */ protected $handlers; /** @var bool */ protected $bubble; /** * @param HandlerInterface[] $handlers Array of Handlers. * @param bool $bubble Whether the messages that are handled can bubble up the stack or not */ public function __construct(array $handlers, bool $bubble = true) { foreach ($handlers as $handler) { if (!$handler instanceof HandlerInterface) { throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); } } $this->handlers = $handlers; $this->bubble = $bubble; } /** * {@inheritDoc} */ public function isHandling(array $record): bool { foreach ($this->handlers as $handler) { if ($handler->isHandling($record)) { return true; } } return false; } /** * {@inheritDoc} */ public function handle(array $record): bool { if ($this->processors) { /** @var Record $record */ $record = $this->processRecord($record); } foreach ($this->handlers as $handler) { $handler->handle($record); } return false === $this->bubble; } /** * {@inheritDoc} */ public function handleBatch(array $records): void { if ($this->processors) { $processed = []; foreach ($records as $record) { $processed[] = $this->processRecord($record); } /** @var Record[] $records */ $records = $processed; } foreach ($this->handlers as $handler) { $handler->handleBatch($records); } } public function reset() { $this->resetProcessors(); foreach ($this->handlers as $handler) { if ($handler instanceof ResettableInterface) { $handler->reset(); } } } public function close(): void { parent::close(); foreach ($this->handlers as $handler) { $handler->close(); } } /** * {@inheritDoc} */ public function setFormatter(FormatterInterface $formatter): HandlerInterface { foreach ($this->handlers as $handler) { if ($handler instanceof FormattableHandlerInterface) { $handler->setFormatter($formatter); } } return $this; } } __halt_compiler();----SIGNATURE:----I/VgdDq0ToG6E0NVtZ3QVuNF2VdU99G6YAvX81v8mDGI31neEy5qaOIw3RdmKPhQH4d376/osm3PpadakmwG7JGBgOfyn18dvqhnRUdWHffLB7NU39Du3zbkQUxIdczs5RCTb53556iXfqz0lTbJaxpK82sa63Ur5QcZsdIKDa4ioNl8JYhhDrUgroDTfQ/U61UsqfbH9+lnGWrodTK7deQ9bPBcZkRL6eBYa7Cx6RVf8qhQ/g4b0FNvB+mHyKh07BKzzzhqVS8XlPbhCxc3c5JtzFX+mYuVWKbG+eRGaQdtQzJ7x/7aigN/30MDSmSyyZl4V/4Evrz+10AeyGWoJqlclGHqhCPwPRCJ/+hb6pEG2xT7IdOxWLtbmMlTZaYoG6ZLuKKLMqH9O9UhWhZciMEF/sS1XSO1+HdOAjGW06tCZ3fIE8gBurmi9xg7ZnmM0aYoj7eQ33YOS6PB/cD8OlzXTSV1IepY+f7BH+8e4FHLBJoyNpN31bZQRGK6W+HK1WlJlKkcpBADF207KahKWUk5xOoxn5rAX+OcaP1BebSxUqfVwJZ9abDXc4NIYMKYIGUhxaw1AF/mKArDAL1dK3jPdz+m6cSeMBc8a1YWjAJpOagncei6ZvQjjvmCCVXYzvt8UB1BDLZKX4rwzTHJTzxA/1+wcdnLkIav51oSq/s=----ATTACHMENT:----MTQ5NTI0MjU0Mzk0NjA0NiA2NTc2NjMyMjg5MzE1Njc0IDc5NjQ5MjI4MTQ2NjQ4OQ==