4 * This file is part of SwiftMailer.
5 * (c) 2004-2009 Chris Corbyn
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
15 * @author Chris Corbyn
17 interface Swift_Mime_Header
23 /** Parameterized headers (text + params) */
24 const TYPE_PARAMETERIZED
= 6;
26 /** Mailbox and address headers */
27 const TYPE_MAILBOX
= 8;
29 /** Date and time headers */
32 /** Identification headers */
35 /** Address path headers */
39 * Get the type of Header that this instance represents.
41 * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX
42 * @see TYPE_DATE, TYPE_ID, TYPE_PATH
44 public function getFieldType();
47 * Set the model for the field body.
48 * The actual types needed will vary depending upon the type of Header.
51 public function setFieldBodyModel($model);
54 * Set the charset used when rendering the Header.
55 * @param string $charset
57 public function setCharset($charset);
60 * Get the model for the field body.
61 * The return type depends on the specifics of the Header.
64 public function getFieldBodyModel();
67 * Get the name of this header (e.g. Subject).
68 * The name is an identifier and as such will be immutable.
71 public function getFieldName();
74 * Get the field body, prepared for folding into a final header value.
77 public function getFieldBody();
80 * Get this Header rendered as a compliant string.
83 public function toString();