X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/72b01148d2d12f71c12440c15fa078b55e1c8f86..e6bf45a70117d00fc6b3b1a92bdcc480a2a8ee23:/lib-php/Result.php diff --git a/lib-php/Result.php b/lib-php/Result.php index a7747ea3..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 = '';