mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 13:44:36 +03:00
33 lines
762 B
PHP
33 lines
762 B
PHP
<?php
|
|
|
|
namespace Nominatim\Token;
|
|
|
|
/**
|
|
* A postcode token.
|
|
*/
|
|
class Postcode
|
|
{
|
|
/// Database word id, if available.
|
|
public $iId;
|
|
/// Full nomralized postcode (upper cased).
|
|
public $sPostcode;
|
|
// Optional country code the postcode belongs to (currently unused).
|
|
public $sCountryCode;
|
|
|
|
public function __construct($iId, $sPostcode, $sCountryCode = '')
|
|
{
|
|
$this->iId = $iId;
|
|
$this->sPostcode = $sPostcode;
|
|
$this->sCountryCode = empty($sCountryCode) ? '' : $sCountryCode;
|
|
}
|
|
|
|
public function debugInfo()
|
|
{
|
|
return array(
|
|
'ID' => $this->iId,
|
|
'Type' => 'postcode',
|
|
'Info' => $this->sPostcode.'('.$this->sCountryCode.')'
|
|
);
|
|
}
|
|
}
|