ConfigInterface.php 934 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\MessageQueue\Publisher;
  7. use Magento\Framework\Exception\LocalizedException;
  8. use Magento\Framework\MessageQueue\Publisher\Config\PublisherConfigItemInterface;
  9. /**
  10. * Publisher config interface provides access data declared in etc/queue_publisher.xml
  11. *
  12. * @api
  13. * @since 102.0.1
  14. */
  15. interface ConfigInterface
  16. {
  17. /**
  18. * Get publisher configuration by topic.
  19. *
  20. * @param string $topic
  21. * @return PublisherConfigItemInterface
  22. * @throws LocalizedException
  23. * @throws \LogicException
  24. * @since 102.0.1
  25. */
  26. public function getPublisher($topic);
  27. /**
  28. * Get list of all publishers declared in the system.
  29. *
  30. * @return PublisherConfigItemInterface[]
  31. * @throws \LogicException
  32. * @since 102.0.1
  33. */
  34. public function getPublishers();
  35. }