3 * Zend Framework (http://framework.zend.com/)
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
10 namespace Zend\Http\Header
;
13 * @throws Exception\InvalidArgumentException
14 * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32
16 class Pragma
implements HeaderInterface
23 public static function fromString($headerLine)
25 list($name, $value) = GenericHeader
::splitHeaderLine($headerLine);
27 // check to ensure proper header type for this factory
28 if (strtolower($name) !== 'pragma') {
29 throw new Exception\
InvalidArgumentException('Invalid header line for Pragma string: "' . $name . '"');
32 // @todo implementation details
33 $header = new static($value);
38 public function __construct($value = null)
41 HeaderValue
::assertValid($value);
42 $this->value
= $value;
46 public function getFieldName()
51 public function getFieldValue()
56 public function toString()
58 return 'Pragma: ' . $this->getFieldValue();