1 | <?php |
||
37 | class Parser implements RequestParserInterface |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * List with keys to validate the values |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $keyValidationList; |
||
46 | |||
47 | /** |
||
48 | * Holds the parsed headers as key => value array. |
||
49 | * |
||
50 | * @var array |
||
51 | */ |
||
52 | protected $headers; |
||
53 | |||
54 | /** |
||
55 | * Init the stomp parser class. |
||
56 | */ |
||
57 | public function __construct() |
||
62 | |||
63 | /** |
||
64 | * Clear the headers to parse new stomp request. |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function clearHeaders() |
||
72 | |||
73 | /** |
||
74 | * Return the headers count. |
||
75 | * |
||
76 | * @return int |
||
77 | */ |
||
78 | public function getHeaderSize() |
||
86 | |||
87 | /** |
||
88 | * Returns the parsed headers. |
||
89 | * |
||
90 | * @return array |
||
91 | */ |
||
92 | public function getParsedHeaders() |
||
102 | |||
103 | /** |
||
104 | * Parse the stomp frame headers. |
||
105 | * |
||
106 | * @param string $frameHeaders The frame headers. |
||
107 | * |
||
108 | * @return void |
||
109 | * @throws \AppserverIo\Stomp\Exception\ProtocolException |
||
110 | */ |
||
111 | public function parseHeaders($frameHeaders) |
||
121 | |||
122 | /** |
||
123 | * Parse's the given header line. |
||
124 | * |
||
125 | * @param string $line The line defining a stomp request header |
||
126 | * |
||
127 | * @return void |
||
128 | * |
||
129 | * @throws \AppserverIo\Stomp\Exception\ProtocolException |
||
130 | */ |
||
131 | public function parseHeaderLine($line) |
||
164 | |||
165 | /** |
||
166 | * Decode the header string. |
||
167 | * |
||
168 | * @param string $string The string to stomp decode. |
||
169 | * |
||
170 | * @return string |
||
171 | */ |
||
172 | protected function decodeHeaderString($string) |
||
180 | |||
181 | /** |
||
182 | * Validates the given header value by given key. |
||
183 | * |
||
184 | * @param string $key The key to find the validation type. |
||
185 | * @param string $value The value to validated by type. |
||
186 | * |
||
187 | * @return bool |
||
188 | */ |
||
189 | protected function validateHeaderValue($key, $value) |
||
209 | |||
210 | /** |
||
211 | * Get the validation list. |
||
212 | * |
||
213 | * @return array |
||
214 | */ |
||
215 | public function getKeyValidationList() |
||
219 | |||
220 | /** |
||
221 | * Set the validation list. |
||
222 | * |
||
223 | * @param array $keyValidationList The list to set for validation |
||
224 | * |
||
225 | * @return void |
||
226 | */ |
||
227 | public function setKeyValidationList($keyValidationList) |
||
231 | } |
||
232 |