1 | <?php |
||
19 | class AgeHeader implements HeaderInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $deltaSeconds; |
||
25 | |||
26 | /** |
||
27 | * Constructor. |
||
28 | * |
||
29 | * @param int|null $deltaSeconds |
||
30 | */ |
||
31 | public function __construct($deltaSeconds = null) |
||
37 | |||
38 | /** |
||
39 | * Set delta seconds. |
||
40 | * |
||
41 | * @param int $deltaSeconds |
||
42 | * |
||
43 | * @return $this |
||
44 | * |
||
45 | * @throws InvalidHeaderValueException |
||
46 | */ |
||
47 | public function setDeltaSeconds($deltaSeconds) |
||
53 | |||
54 | /** |
||
55 | * Factory create AgeHeader from string. |
||
56 | * |
||
57 | * @param string $headerLine |
||
58 | * |
||
59 | * @return $this |
||
60 | */ |
||
61 | public static function fromString($headerLine) |
||
68 | |||
69 | /** |
||
70 | * Cast header to string. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function __toString() |
||
78 | |||
79 | /** |
||
80 | * Get header field name. |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getFieldName() |
||
88 | |||
89 | /** |
||
90 | * Get header field value. |
||
91 | * |
||
92 | * @return int |
||
93 | */ |
||
94 | public function getFieldValue() |
||
98 | } |
||
99 |