ConverterInterface.php 778 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Analytics\Model\Connector\Http;
  7. /**
  8. * Represents converter interface for http request and response body.
  9. *
  10. * @api
  11. * @since 100.2.0
  12. */
  13. interface ConverterInterface
  14. {
  15. /**
  16. * @param string $body
  17. *
  18. * @return array
  19. * @since 100.2.0
  20. */
  21. public function fromBody($body);
  22. /**
  23. * @param array $data
  24. *
  25. * @return string
  26. * @since 100.2.0
  27. */
  28. public function toBody(array $data);
  29. /**
  30. * @return string
  31. * @since 100.2.0
  32. */
  33. public function getContentTypeHeader();
  34. /**
  35. * @return string
  36. * @since 100.3.0
  37. */
  38. public function getContentMediaType(): string;
  39. }