ShouldQueueInterface.php 431 B

123456789101112131415161718192021
  1. <?php
  2. namespace UCore\Queue;
  3. /**
  4. * 队列事件监听器接口
  5. *
  6. * 为队列事件监听器定义统一的接口规范
  7. */
  8. interface ShouldQueueInterface
  9. {
  10. /**
  11. * 实际运行方法
  12. *
  13. * 队列事件监听器的核心执行方法
  14. *
  15. * @param object $event 事件对象
  16. * @return bool 返回true表示处理成功,false表示处理失败
  17. */
  18. public function run(object $event): bool;
  19. }