FeedFactoryInterface.php 685 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Framework\App;
  8. /**
  9. * Feed factory interface
  10. */
  11. interface FeedFactoryInterface
  12. {
  13. /**
  14. * RSS feed input format
  15. */
  16. const FORMAT_RSS = 'rss';
  17. /**
  18. * Returns FeedInterface object from a custom array
  19. *
  20. * @throws \Magento\Framework\Exception\InputException
  21. * @throws \Magento\Framework\Exception\RuntimeException
  22. * @param array $data
  23. * @param string $format
  24. * @return FeedInterface
  25. */
  26. public function create(array $data, string $format = self::FORMAT_RSS) : FeedInterface;
  27. }