]> git.openstreetmap.org Git - nominatim.git/blob - lib/TokenWord.php
add documentation for TokenList
[nominatim.git] / lib / TokenWord.php
1 <?php
2
3 namespace Nominatim\Token;
4
5 /**
6  * A standard word token.
7  */
8 class Word
9 {
10     public $iId;
11     // If true, the word may represent only part of a place name.
12     public $bPartial;
13     // Number of appearances in the database.
14     public $iSearchNameCount;
15
16     public function __construct($iId, $bPartial, $iSearchNameCount)
17     {
18         $this->iId = $iId;
19         $this->bPartial = $bPartial;
20         $this->iSearchNameCount = $iSearchNameCount;
21     }
22
23     public function debugInfo()
24     {
25         return array(
26                 'ID' => $this->iId,
27                 'Type' => 'word',
28                 'Info' => array(
29                            'partial' => $this->bPartial,
30                            'count' => $this->iSearchNameCount
31                           )
32                );
33     }
34 }