TYPO3 API  SVNRelease
Header.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * This file is part of SwiftMailer.
00005  * (c) 2004-2009 Chris Corbyn
00006  *
00007  * For the full copyright and license information, please view the LICENSE
00008  * file that was distributed with this source code.
00009  */
00010 
00011 /**
00012  * A MIME Header.
00013  * @package Swift
00014  * @subpackage Mime
00015  * @author Chris Corbyn
00016  */
00017 interface Swift_Mime_Header
00018 {
00019 
00020   /** Text headers */
00021   const TYPE_TEXT = 2;
00022 
00023   /** Parameterized headers (text + params) */
00024   const TYPE_PARAMETERIZED = 6;
00025 
00026   /** Mailbox and address headers */
00027   const TYPE_MAILBOX = 8;
00028 
00029   /** Date and time headers */
00030   const TYPE_DATE = 16;
00031 
00032   /** Identification headers */
00033   const TYPE_ID = 32;
00034 
00035   /** Address path headers */
00036   const TYPE_PATH = 64;
00037 
00038   /**
00039    * Get the type of Header that this instance represents.
00040    * @return int
00041    * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX
00042    * @see TYPE_DATE, TYPE_ID, TYPE_PATH
00043    */
00044   public function getFieldType();
00045 
00046   /**
00047    * Set the model for the field body.
00048    * The actual types needed will vary depending upon the type of Header.
00049    * @param mixed $model
00050    */
00051   public function setFieldBodyModel($model);
00052 
00053   /**
00054    * Set the charset used when rendering the Header.
00055    * @param string $charset
00056    */
00057   public function setCharset($charset);
00058 
00059   /**
00060    * Get the model for the field body.
00061    * The return type depends on the specifics of the Header.
00062    * @return mixed
00063    */
00064   public function getFieldBodyModel();
00065 
00066   /**
00067    * Get the name of this header (e.g. Subject).
00068    * The name is an identifier and as such will be immutable.
00069    * @return string
00070    */
00071   public function getFieldName();
00072 
00073   /**
00074    * Get the field body, prepared for folding into a final header value.
00075    * @return string
00076    */
00077   public function getFieldBody();
00078 
00079   /**
00080    * Get this Header rendered as a compliant string.
00081    * @return string
00082    */
00083   public function toString();
00084 
00085 }