X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/9a5d5d9aec4cf785c8190c37a3136cf09aca6902..c02bf4986f4c6a820325727fa4b56e54a63c40d6:/lib/SearchContext.php diff --git a/lib/SearchContext.php b/lib/SearchContext.php index f5eab95a..9bab8658 100644 --- a/lib/SearchContext.php +++ b/lib/SearchContext.php @@ -6,7 +6,7 @@ require_once(CONST_BasePath.'/lib/lib.php'); /** - * Collects search constraints that are independent of the + * Collection of search constraints that are independent of the * actual interpretation of the search query. * * The search context is shared between all SearchDescriptions. This @@ -15,16 +15,25 @@ require_once(CONST_BasePath.'/lib/lib.php'); */ class SearchContext { + /// Search radius around a given Near reference point. private $fNearRadius = false; + /// True if search must be restricted to viewbox only. public $bViewboxBounded = false; + /// Reference point for search (as SQL). public $sqlNear = ''; + /// Viewbox selected for search (as SQL). public $sqlViewboxSmall = ''; + /// Viewbox with a larger buffer around (as SQL). public $sqlViewboxLarge = ''; + /// Reference along a route (as SQL). public $sqlViewboxCentre = ''; + /// List of countries to restrict search to (as SQL). public $sqlCountryList = ''; + /// List of place IDs to exclude (as SQL). private $sqlExcludeList = ''; + public function hasNearPoint() { return $this->fNearRadius !== false; @@ -44,7 +53,6 @@ class SearchContext public function isBoundedSearch() { return $this->hasNearPoint() || ($this->sqlViewboxSmall && $this->bViewboxBounded); - } public function setViewboxFromBox(&$aViewBox, $bBounded)