private $oNormalizer;
private $oTransliterator;
- private $aCountryRestriction;
public function __construct(&$oDB)
{
}
- public function setCountryRestriction($aCountries)
- {
- $this->aCountryRestriction = $aCountries;
- }
-
-
public function normalizeString($sTerm)
{
if ($this->oNormalizer === null) {
switch ($aWord['type']) {
case 'C': // country name tokens
- if ($aWord['word'] !== null
- && (!$this->aCountryRestriction
- || in_array($aWord['word'], $this->aCountryRestriction))
- ) {
+ if ($aWord['word'] !== null) {
$oValidTokens->addToken(
$sTok,
new Token\Country($iId, $aWord['word'])