]> git.openstreetmap.org Git - nominatim.git/blob - lib/TokenPostcode.php
use consistent naming in doc pages
[nominatim.git] / lib / TokenPostcode.php
1 <?php
2
3 namespace Nominatim\Token;
4
5 /**
6  * A postcode token.
7  */
8 class Postcode
9 {
10     /// Database word id, if available.
11     public $iId;
12     /// Full nomralized postcode (upper cased).
13     public $sPostcode;
14     // Optional country code the postcode belongs to (currently unused).
15     public $sCountryCode;
16
17     public function __construct($iId, $sPostcode, $sCountryCode = '')
18     {
19         $this->iId = $iId;
20         $this->sPostcode = $sPostcode;
21         $this->sCountryCode = empty($sCountryCode) ? '' : $sCountryCode;
22     }
23
24     public function debugInfo()
25     {
26         return array(
27                 'ID' => $this->iId,
28                 'Type' => 'postcode',
29                 'Info' => $this->sPostcode.'('.$this->sCountryCode.')'
30                );
31     }
32 }