ProcessableHandlerInterface.php 948 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. * @author Jordi Boggiano <j.boggiano@seld.be>
  16. */
  17. interface ProcessableHandlerInterface
  18. {
  19. /**
  20. * Adds a processor in the stack.
  21. *
  22. * @param ProcessorInterface|callable $callback
  23. * @return HandlerInterface self
  24. */
  25. public function pushProcessor(callable $callback): HandlerInterface;
  26. /**
  27. * Removes the processor on top of the stack and returns it.
  28. *
  29. * @throws \LogicException In case the processor stack is empty
  30. * @return callable
  31. */
  32. public function popProcessor(): callable;
  33. }