<?php
+/**
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ * This file is part of Nominatim. (https://nominatim.org)
+ *
+ * Copyright (C) 2022 by the Nominatim developer community.
+ * For a full list of authors see the git log.
+ */
namespace Nominatim;
}
)));
}
+
+ public static function joinIdsByTableMinRank($aResults, $iTable, $iMinAddressRank)
+ {
+ return join(',', array_keys(array_filter(
+ $aResults,
+ function ($aValue) use ($iTable, $iMinAddressRank) {
+ return $aValue->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 = '';