| 1 | <?php |
||
| 17 | class UserAgentHeader implements HeaderInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $value; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructor. |
||
| 26 | * |
||
| 27 | * @param string|null $value |
||
| 28 | */ |
||
| 29 | public function __construct($value = null) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Factory create UserAgentHeader from string representation. |
||
| 39 | * |
||
| 40 | * @param string $headerLine |
||
| 41 | * |
||
| 42 | * @return $this |
||
| 43 | */ |
||
| 44 | public static function fromString($headerLine) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Get header field name. |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getFieldName() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get header field value. |
||
| 65 | * |
||
| 66 | * @return mixed |
||
| 67 | */ |
||
| 68 | public function getFieldValue() |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Cast header to string. |
||
| 75 | * |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function __toString() |
||
| 82 | } |
||
| 83 |