X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5c7b9ef909b3c30bbe640f4373a1127e15a7e018..7205491b8495e48c62b28373d1746e77d475582b:/lib-php/Result.php diff --git a/lib-php/Result.php b/lib-php/Result.php index be103074..4b244d1d 100644 --- a/lib-php/Result.php +++ b/lib-php/Result.php @@ -1,4 +1,12 @@ iTable == $iTable && $aValue->iAddressRank >= $iMinAddressRank; + } + ))); + } + + public static function joinIdsByTableMaxRank($aResults, $iTable, $iMaxAddressRank) + { + return join(',', array_keys(array_filter( + $aResults, + function ($aValue) use ($iTable, $iMaxAddressRank) { + return $aValue->iTable == $iTable && $aValue->iAddressRank <= $iMaxAddressRank; + } + ))); + } + public static function sqlHouseNumberTable($aResults, $iTable) { $sHousenumbers = '';