HeaderSigner.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Header Signer Interface used to apply Header-Based Signature to a message.
  11. *
  12. * @author Xavier De Cock <xdecock@gmail.com>
  13. */
  14. interface Swift_Signers_HeaderSigner extends Swift_Signer, Swift_InputByteStream
  15. {
  16. /**
  17. * Exclude an header from the signed headers.
  18. *
  19. * @param string $header_name
  20. *
  21. * @return self
  22. */
  23. public function ignoreHeader($header_name);
  24. /**
  25. * Prepare the Signer to get a new Body.
  26. *
  27. * @return self
  28. */
  29. public function startBody();
  30. /**
  31. * Give the signal that the body has finished streaming.
  32. *
  33. * @return self
  34. */
  35. public function endBody();
  36. /**
  37. * Give the headers already given.
  38. *
  39. * @return self
  40. */
  41. public function setHeaders(Swift_Mime_SimpleHeaderSet $headers);
  42. /**
  43. * Add the header(s) to the headerSet.
  44. *
  45. * @return self
  46. */
  47. public function addSignature(Swift_Mime_SimpleHeaderSet $headers);
  48. /**
  49. * Return the list of header a signer might tamper.
  50. *
  51. * @return array
  52. */
  53. public function getAlteredHeaders();
  54. }