You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.4 KiB

3 years ago
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Mime\Header;
  11. /**
  12. * A MIME Header.
  13. *
  14. * @author Chris Corbyn
  15. */
  16. interface HeaderInterface
  17. {
  18. /**
  19. * Sets the body.
  20. *
  21. * The type depends on the Header concrete class.
  22. *
  23. * @param mixed $body
  24. */
  25. public function setBody($body);
  26. /**
  27. * Gets the body.
  28. *
  29. * The return type depends on the Header concrete class.
  30. *
  31. * @return mixed
  32. */
  33. public function getBody();
  34. public function setCharset(string $charset);
  35. public function getCharset(): ?string;
  36. public function setLanguage(string $lang);
  37. public function getLanguage(): ?string;
  38. public function getName(): string;
  39. public function setMaxLineLength(int $lineLength);
  40. public function getMaxLineLength(): int;
  41. /**
  42. * Gets this Header rendered as a compliant string.
  43. */
  44. public function toString(): string;
  45. /**
  46. * Gets the header's body, prepared for folding into a final header value.
  47. *
  48. * This is not necessarily RFC 2822 compliant since folding white space is
  49. * not added at this stage (see {@link toString()} for that).
  50. */
  51. public function getBodyAsString(): string;
  52. }