HeaderFactory.php 1.9 KB

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