Nominatim/lib-php/TokenWord.php

39 lines
956 B
PHP
Raw Normal View History

<?php
namespace Nominatim\Token;
/**
* A standard word token.
*/
class Word
{
2018-05-15 00:23:38 +03:00
/// Database word id, if applicable.
public $iId;
2018-05-15 00:23:38 +03:00
/// If true, the word may represent only part of a place name.
public $bPartial;
2018-05-15 00:23:38 +03:00
/// Number of appearances in the database.
public $iSearchNameCount;
/// Number of terms in the word.
public $iTermCount;
public function __construct($iId, $bPartial, $iSearchNameCount, $iTermCount)
{
$this->iId = $iId;
$this->bPartial = $bPartial;
$this->iSearchNameCount = $iSearchNameCount;
$this->iTermCount = $iTermCount;
}
public function debugInfo()
{
return array(
'ID' => $this->iId,
'Type' => 'word',
'Info' => array(
'partial' => $this->bPartial,
'count' => $this->iSearchNameCount
)
);
}
}