/**
* Derive new searches by adding a full term to the existing search.
*
- * @param string $sToken Term for the token.
* @param object $oSearchTerm Description of the token.
* @param object $oPosition Description of the token position within
the query.
*
* @return SearchDescription[] List of derived search descriptions.
*/
- public function extendWithSearchTerm($sToken, $oSearchTerm, $oPosition)
+ public function extendWithSearchTerm($oSearchTerm, $oPosition)
{
$aNewSearches = array();
}
} elseif (!$oPosition->isPhrase('country')
&& is_a($oSearchTerm, '\Nominatim\Token\Partial')
- && strpos($sToken, ' ') === false
) {
$aNewSearches = $this->extendWithPartialTerm(
- $sToken,
$oSearchTerm,
$oPosition
);
/**
* Derive new searches by adding a partial term to the existing search.
*
- * @param string $sToken Term for the token.
* @param object $oSearchTerm Description of the token.
* @param object $oPosition Description of the token position within
the query.
*
* @return SearchDescription[] List of derived search descriptions.
*/
- private function extendWithPartialTerm($sToken, $oSearchTerm, $oPosition)
+ private function extendWithPartialTerm($oSearchTerm, $oPosition)
{
$aNewSearches = array();
$iWordID = $oSearchTerm->iId;
) {
$oSearch = clone $this;
$oSearch->iSearchRank++;
- if (preg_match('#^[0-9 ]+$#', $sToken)) {
+ if (preg_match('#^[0-9 ]+$#', $oSearchTerm->sToken)) {
$oSearch->iSearchRank++;
}
if ($oSearchTerm->iSearchNameCount < CONST_Max_Word_Frequency) {
if (empty($this->aName) && empty($this->aNameNonSearch)) {
$oSearch->iSearchRank++;
}
- if (preg_match('#^[0-9 ]+$#', $sToken)) {
+ if (preg_match('#^[0-9 ]+$#', $oSearchTerm->sToken)) {
$oSearch->iSearchRank++;
}
if ($oSearchTerm->iSearchNameCount < CONST_Max_Word_Frequency) {