private $oDB;
private $oNormalizer = null;
- private $aCountryRestriction = null;
public function __construct(&$oDB)
{
}
- public function setCountryRestriction($aCountries)
- {
- $this->aCountryRestriction = $aCountries;
- }
-
-
public function normalizeString($sTerm)
{
if ($this->oNormalizer === null) {
);
}
} elseif ($aWord['country_code']) {
- // Filter country tokens that do not match restricted countries.
- if (!$this->aCountryRestriction
- || in_array($aWord['country_code'], $this->aCountryRestriction)
- ) {
- $oToken = new Token\Country($iId, $aWord['country_code']);
- }
+ $oToken = new Token\Country($iId, $aWord['country_code']);
} elseif ($aWord['word_token'][0] == ' ') {
$oToken = new Token\Word(
$iId,