NotifierInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Notification;
  7. /**
  8. * Interface for notifiers
  9. *
  10. * Interface NotifierInterface
  11. *
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface NotifierInterface
  16. {
  17. /**
  18. * Add new message
  19. *
  20. * @param int $severity
  21. * @param string $title
  22. * @param string|string[] $description
  23. * @param string $url
  24. * @param bool $isInternal
  25. * @throws \Magento\Framework\Exception\LocalizedException
  26. * @return $this
  27. */
  28. public function add($severity, $title, $description, $url = '', $isInternal = true);
  29. /**
  30. * Add critical severity message
  31. *
  32. * @param string $title
  33. * @param string|string[] $description
  34. * @param string $url
  35. * @param bool $isInternal
  36. * @return $this
  37. */
  38. public function addCritical($title, $description, $url = '', $isInternal = true);
  39. /**
  40. * Add major severity message
  41. *
  42. * @param string $title
  43. * @param string|string[] $description
  44. * @param string $url
  45. * @param bool $isInternal
  46. * @return $this
  47. */
  48. public function addMajor($title, $description, $url = '', $isInternal = true);
  49. /**
  50. * Add minor severity message
  51. *
  52. * @param string $title
  53. * @param string|string[] $description
  54. * @param string $url
  55. * @param bool $isInternal
  56. * @return $this
  57. */
  58. public function addMinor($title, $description, $url = '', $isInternal = true);
  59. /**
  60. * Add notice
  61. *
  62. * @param string $title
  63. * @param string|string[] $description
  64. * @param string $url
  65. * @param bool $isInternal
  66. * @return $this
  67. */
  68. public function addNotice($title, $description, $url = '', $isInternal = true);
  69. }