fix calendar css, take 2. (#213)
[openemr.git] / interface / modules / zend_modules / library / Zend / Http / Header / Upgrade.php
blob909a3f01455a544951c670a3e9225efc483fd1c0
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-2015 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.42
16 class Upgrade implements HeaderInterface
18 /**
19 * @var string
21 protected $value;
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) !== 'upgrade') {
29 throw new Exception\InvalidArgumentException('Invalid header line for Upgrade string: "' . $name . '"');
32 // @todo implementation details
33 $header = new static($value);
35 return $header;
38 public function __construct($value = null)
40 if ($value) {
41 HeaderValue::assertValid($value);
42 $this->value = $value;
46 public function getFieldName()
48 return 'Upgrade';
51 public function getFieldValue()
53 return $this->value;
56 public function toString()
58 return 'Upgrade: ' . $this->getFieldValue();