+ continue;
+ }
+ $oToken = new Token\Country($iId, $aWord['country'])
+ break;
+ 'H': // house number tokens
+ $oToken = new Token\HouseNumber($iId, $aWord['word_token']);
+ break;
+ 'P': // postcode tokens
+ // Postcodes are not normalized, so they may have content
+ // that makes SQL injection possible. Reject postcodes
+ // that would need special escaping.
+ if ($aWord['postcode'] === null
+ || pg_escape_string($aWord['postcode']) == $aWord['postcode']
+ ) {
+ continue;
+ }
+ $sNormPostcode = $this->normalizeString($aWord['postcode']);
+ if (strpos($sNormQuery, $sNormPostcode) === false) {
+ continue;
+ }
+ $oToken = new Token\Postcode($iId, $aWord['postcode'], null);
+ break;
+ 'S': // tokens for classification terms (special phrases)
+ if ($aWord['class'] === null || $aWord['type'] === null
+ ) {
+ continue;