Nominatim/lib-php/TokenPostcode.php

33 lines
762 B
PHP
Raw Normal View History

<?php
namespace Nominatim\Token;
/**
* A postcode token.
*/
class Postcode
{
2018-05-15 00:23:38 +03:00
/// Database word id, if available.
public $iId;
2018-05-15 00:23:38 +03:00
/// Full nomralized postcode (upper cased).
public $sPostcode;
2018-05-15 00:23:38 +03:00
// 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.')'
);
}
}