1 | <?php |
||
5 | abstract class Common implements Abstracted |
||
6 | { |
||
7 | |||
8 | protected $headerName = 'Unspecified'; |
||
9 | |||
10 | protected $headerValue = ''; |
||
11 | |||
12 | protected $data = null; |
||
13 | |||
14 | |||
15 | /** |
||
16 | * @param string $headerValue |
||
17 | */ |
||
18 | 57 | public function __construct($headerValue = '') |
|
22 | |||
23 | |||
24 | /** |
||
25 | * @param string $headerValue |
||
26 | */ |
||
27 | 7 | public function setValue($headerValue) |
|
31 | |||
32 | |||
33 | 4 | public function getName() |
|
37 | |||
38 | 3 | public function getValue() |
|
42 | |||
43 | |||
44 | 46 | public function prepare() |
|
45 | { |
||
46 | 46 | $this->data = null; |
|
47 | |||
48 | 46 | if (strlen($this->headerValue) > 0) { |
|
49 | 41 | $this->data = $this->extractData($this->headerValue); |
|
50 | } |
||
51 | 46 | } |
|
52 | |||
53 | |||
54 | abstract protected function extractData($headerValue); |
||
55 | |||
56 | |||
57 | 21 | public function getParsedData() |
|
61 | |||
62 | |||
63 | 1 | public function isFinal() |
|
67 | |||
68 | |||
69 | 1 | public function getParameter($name) |
|
77 | } |
||
78 |