From 1f689bdaae1b327fd74a26c47185cd3bf927f074 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 14 May 2018 23:23:38 +0200 Subject: [PATCH] document tokens --- lib/TokenCountry.php | 2 ++ lib/TokenHousenumber.php | 2 ++ lib/TokenPostcode.php | 5 +++-- lib/TokenSpecialTerm.php | 4 ++++ lib/TokenWord.php | 5 +++-- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/TokenCountry.php b/lib/TokenCountry.php index 1b545882..518c0a31 100644 --- a/lib/TokenCountry.php +++ b/lib/TokenCountry.php @@ -7,7 +7,9 @@ namespace Nominatim\Token; */ class Country { + /// Database word id, if available. public $iId; + /// Two-letter country code (lower-cased). public $sCountryCode; public function __construct($iId, $sCountryCode) diff --git a/lib/TokenHousenumber.php b/lib/TokenHousenumber.php index 788b7304..5c7c6e9b 100644 --- a/lib/TokenHousenumber.php +++ b/lib/TokenHousenumber.php @@ -7,7 +7,9 @@ namespace Nominatim\Token; */ class HouseNumber { + /// Database word id, if available. public $iId; + /// Normalized house number. public $sToken; public function __construct($iId, $sToken) diff --git a/lib/TokenPostcode.php b/lib/TokenPostcode.php index b4bdbfc4..8fa2ae80 100644 --- a/lib/TokenPostcode.php +++ b/lib/TokenPostcode.php @@ -7,10 +7,11 @@ namespace Nominatim\Token; */ class Postcode { + /// Database word id, if available. public $iId; - // full postcode + /// Full nomralized postcode (upper cased). public $sPostcode; - // optional restriction to a given country + // Optional country code the postcode belongs to (currently unused). public $sCountryCode; public function __construct($iId, $sPostcode, $sCountryCode = '') diff --git a/lib/TokenSpecialTerm.php b/lib/TokenSpecialTerm.php index d2a21721..46966a8a 100644 --- a/lib/TokenSpecialTerm.php +++ b/lib/TokenSpecialTerm.php @@ -9,9 +9,13 @@ require_once(CONST_BasePath.'/lib/SpecialSearchOperator.php'); */ class SpecialTerm { + /// Database word id, if applicable. public $iId; + /// Class (or OSM tag key) of the place to look for. public $sClass; + /// Type (or OSM tag value) of the place to look for. public $sType; + /// Relationship of the operator to the object (see Operator class). public $iOperator; public function __construct($iID, $sClass, $sType, $iOperator) diff --git a/lib/TokenWord.php b/lib/TokenWord.php index 92940c10..54622cbc 100644 --- a/lib/TokenWord.php +++ b/lib/TokenWord.php @@ -7,10 +7,11 @@ namespace Nominatim\Token; */ class Word { + /// Database word id, if applicable. public $iId; - // If true, the word may represent only part of a place name. + /// If true, the word may represent only part of a place name. public $bPartial; - // Number of appearances in the database. + /// Number of appearances in the database. public $iSearchNameCount; public function __construct($iId, $bPartial, $iSearchNameCount) -- 2.39.5