1 | <?php |
||
20 | class ContentLengthHeader implements HeaderInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var mixed |
||
24 | */ |
||
25 | private $length; |
||
26 | |||
27 | /** |
||
28 | * Constructor. |
||
29 | * |
||
30 | * @param mixed $length |
||
31 | */ |
||
32 | public function __construct($length) |
||
37 | |||
38 | /** |
||
39 | * Factory create ContentLengthHeader from string representation. |
||
40 | * |
||
41 | * @param string $headerLine |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
45 | 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 |