HeaderFactory.php 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. * Creates MIME headers.
  11. * @package Swift
  12. * @subpackage Mime
  13. * @author Chris Corbyn
  14. */
  15. interface Swift_Mime_HeaderFactory extends Swift_Mime_CharsetObserver
  16. {
  17. /**
  18. * Create a new Mailbox Header with a list of $addresses.
  19. * @param string $name
  20. * @param array|string $addresses
  21. * @return Swift_Mime_Header
  22. */
  23. public function createMailboxHeader($name, $addresses = null);
  24. /**
  25. * Create a new Date header using $timestamp (UNIX time).
  26. * @param string $name
  27. * @param int $timestamp
  28. * @return Swift_Mime_Header
  29. */
  30. public function createDateHeader($name, $timestamp = null);
  31. /**
  32. * Create a new basic text header with $name and $value.
  33. * @param string $name
  34. * @param string $value
  35. * @return Swift_Mime_Header
  36. */
  37. public function createTextHeader($name, $value = null);
  38. /**
  39. * Create a new ParameterizedHeader with $name, $value and $params.
  40. * @param string $name
  41. * @param string $value
  42. * @param array $params
  43. * @return Swift_Mime_ParameterizedHeader
  44. */
  45. public function createParameterizedHeader($name, $value = null,
  46. $params = array());
  47. /**
  48. * Create a new ID header for Message-ID or Content-ID.
  49. * @param string $name
  50. * @param string|array $ids
  51. * @return Swift_Mime_Header
  52. */
  53. public function createIdHeader($name, $ids = null);
  54. /**
  55. * Create a new Path header with an address (path) in it.
  56. * @param string $name
  57. * @param string $path
  58. * @return Swift_Mime_Header
  59. */
  60. public function createPathHeader($name, $path = null);
  61. }