HeaderFactory.php 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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, $params = array());
  46. /**
  47. * Create a new ID header for Message-ID or Content-ID.
  48. * @param string $name
  49. * @param string|array $ids
  50. * @return Swift_Mime_Header
  51. */
  52. public function createIdHeader($name, $ids = null);
  53. /**
  54. * Create a new Path header with an address (path) in it.
  55. * @param string $name
  56. * @param string $path
  57. * @return Swift_Mime_Header
  58. */
  59. public function createPathHeader($name, $path = null);
  60. }