Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Http / Header / ContentEncoding.php
blob5a16279b249aa5f5f78cf25d4cb5c2d476034178
1 <?php
2 /**
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
8 */
10 namespace Zend\Http\Header;
12 /**
13 * @throws Exception\InvalidArgumentException
14 * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
16 class ContentEncoding implements HeaderInterface
19 public static function fromString($headerLine)
21 $header = new static();
23 list($name, $value) = GenericHeader::splitHeaderLine($headerLine);
25 // check to ensure proper header type for this factory
26 if (strtolower($name) !== 'content-encoding') {
27 throw new Exception\InvalidArgumentException('Invalid header line for Content-Encoding string: "' . $name . '"');
30 // @todo implementation details
31 $header->value = $value;
33 return $header;
36 public function getFieldName()
38 return 'Content-Encoding';
41 public function getFieldValue()
43 return $this->value;
46 public function toString()
48 return 'Content-Encoding: ' . $this->getFieldValue();