Propagation.php 774 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. namespace Hyperf\ExceptionHandler;
  12. use Hyperf\Support\Traits\StaticInstance;
  13. class Propagation
  14. {
  15. use StaticInstance;
  16. /**
  17. * Determine if the exception should propagate to next handler.
  18. */
  19. protected bool $propagationStopped = false;
  20. public function isPropagationStopped(): bool
  21. {
  22. return $this->propagationStopped;
  23. }
  24. public function setPropagationStopped(bool $propagationStopped): Propagation
  25. {
  26. $this->propagationStopped = $propagationStopped;
  27. return $this;
  28. }
  29. }