HeaderSigner.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 Swift_Signers_HeaderSigner
  22. */
  23. public function ignoreHeader($header_name);
  24. /**
  25. * Prepare the Signer to get a new Body
  26. *
  27. * @return Swift_Signers_HeaderSigner
  28. */
  29. public function startBody();
  30. /**
  31. * Give the signal that the body has finished streaming
  32. *
  33. * @return Swift_Signers_HeaderSigner
  34. */
  35. public function endBody();
  36. /**
  37. * Give the headers already given
  38. *
  39. * @param Swift_Mime_SimpleHeaderSet $headers
  40. *
  41. * @return Swift_Signers_HeaderSigner
  42. */
  43. public function setHeaders(Swift_Mime_HeaderSet $headers);
  44. /**
  45. * Add the header(s) to the headerSet
  46. *
  47. * @param Swift_Mime_HeaderSet $headers
  48. *
  49. * @return Swift_Signers_HeaderSigner
  50. */
  51. public function addSignature(Swift_Mime_HeaderSet $headers);
  52. /**
  53. * Return the list of header a signer might tamper
  54. *
  55. * @return array
  56. */
  57. public function getAlteredHeaders();
  58. }