1<?php
2/**
3 * Zend Framework (http://framework.zend.com/)
4 *
5 * @link      http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license   http://framework.zend.com/license/new-bsd New BSD License
8 */
9
10namespace Zend\Http\Header;
11
12/**
13 * Interface for HTTP Header classes.
14 */
15interface HeaderInterface
16{
17    /**
18     * Factory to generate a header object from a string
19     *
20     * @param string $headerLine
21     * @return self
22     * @throws Exception\InvalidArgumentException If the header does not match RFC 2616 definition.
23     * @see http://tools.ietf.org/html/rfc2616#section-4.2
24     */
25    public static function fromString($headerLine);
26
27    /**
28     * Retrieve header name
29     *
30     * @return string
31     */
32    public function getFieldName();
33
34    /**
35     * Retrieve header value
36     *
37     * @return string
38     */
39    public function getFieldValue();
40
41    /**
42     * Cast to string
43     *
44     * Returns in form of "NAME: VALUE"
45     *
46     * @return string
47     */
48    public function toString();
49}
50