HeaderFactory.php 1.9KB

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