3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Mail\Header
;
12 interface HeaderInterface
15 * Format value in Mime-Encoding if not US-ASCII encoding is used
19 const FORMAT_ENCODED
= true;
22 * Return value with the interval ZF2 value (UTF-8 non-encoded)
26 const FORMAT_RAW
= false;
30 * Factory to generate a header object from a string
32 * @param string $headerLine
34 * @throws Exception\InvalidArgumentException If the header does not match with RFC 2822 definition.
35 * @see http://tools.ietf.org/html/rfc2822#section-2.2
37 public static function fromString($headerLine);
40 * Retrieve header name
44 public function getFieldName();
47 * Retrieve header value
49 * @param bool $format Return the value in Mime::Encoded or in Raw format
52 public function getFieldValue($format = HeaderInterface
::FORMAT_RAW
);
57 * @param string $encoding
60 public function setEncoding($encoding);
67 public function getEncoding();
72 * Returns in form of "NAME: VALUE"
76 public function toString();