ProcessableHandlerInterface.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php declare(strict_types=1);
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Monolog\Handler;
  11. use Monolog\Processor\ProcessorInterface;
  12. /**
  13. * Interface to describe loggers that have processors
  14. *
  15. * @internal This interface is present in monolog 1.x to ease forward compatibility.
  16. * @author Jordi Boggiano <j.boggiano@seld.be>
  17. */
  18. interface ProcessableHandlerInterface
  19. {
  20. /**
  21. * Adds a processor in the stack.
  22. *
  23. * @param ProcessorInterface|callable $callback
  24. * @return HandlerInterface self
  25. */
  26. public function pushProcessor(callable $callback): HandlerInterface;
  27. /**
  28. * Removes the processor on top of the stack and returns it.
  29. *
  30. * @throws \LogicException In case the processor stack is empty
  31. * @return callable
  32. */
  33. public function popProcessor(): callable;
  34. }