mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 19:07:58 +00:00
introduce classes for token list and token types
This commit is contained in:
27
lib/TokenCountry.php
Normal file
27
lib/TokenCountry.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Nominatim\Token;
|
||||
|
||||
/**
|
||||
* A country token.
|
||||
*/
|
||||
class Country
|
||||
{
|
||||
public $iId;
|
||||
public $sCountryCode;
|
||||
|
||||
public function __construct($iId, $sCountryCode)
|
||||
{
|
||||
$this->iId = $iId;
|
||||
$this->sCountryCode = $sCountryCode;
|
||||
}
|
||||
|
||||
public function debugInfo()
|
||||
{
|
||||
return array(
|
||||
'ID' => $this->iId,
|
||||
'Type' => 'country',
|
||||
'Info' => $this->sCountryCode
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user