IRegistry.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Support\CrashReport;
  8. use Exception;
  9. use OCP\AppFramework\Bootstrap\IRegistrationContext;
  10. use Throwable;
  11. /**
  12. * @since 13.0.0
  13. * @deprecated used internally only
  14. */
  15. interface IRegistry {
  16. /**
  17. * Register a reporter instance
  18. *
  19. * @param IReporter $reporter
  20. *
  21. * @since 13.0.0
  22. * @deprecated 20.0.0 use IRegistrationContext::registerCrashReporter
  23. * @see IRegistrationContext::registerCrashReporter()
  24. */
  25. public function register(IReporter $reporter): void;
  26. /**
  27. * Delegate breadcrumb collection to all registered reporters
  28. *
  29. * @param string $message
  30. * @param string $category
  31. * @param array $context
  32. *
  33. * @deprecated used internally only
  34. * @since 15.0.0
  35. */
  36. public function delegateBreadcrumb(string $message, string $category, array $context = []): void;
  37. /**
  38. * Delegate crash reporting to all registered reporters
  39. *
  40. * @param Exception|Throwable $exception
  41. * @param array $context
  42. *
  43. * @deprecated used internally only
  44. * @since 13.0.0
  45. */
  46. public function delegateReport($exception, array $context = []);
  47. /**
  48. * Delegate a message to all reporters that implement IMessageReporter
  49. *
  50. * @param string $message
  51. * @param array $context
  52. *
  53. * @return void
  54. *
  55. * @deprecated used internally only
  56. * @since 17.0.0
  57. */
  58. public function delegateMessage(string $message, array $context = []): void;
  59. /**
  60. * Check if any reporter has been registered to delegate to
  61. *
  62. * @return bool
  63. * @deprecated use internally only
  64. * @since 26.0.0
  65. */
  66. public function hasReporters(): bool;
  67. }