]> git.openstreetmap.org Git - nominatim.git/blob - lib/TokenWord.php
New readme file on how to build the documentation
[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     /// Database word id, if applicable.
11     public $iId;
12     /// If true, the word may represent only part of a place name.
13     public $bPartial;
14     /// Number of appearances in the database.
15     public $iSearchNameCount;
16
17     public function __construct($iId, $bPartial, $iSearchNameCount)
18     {
19         $this->iId = $iId;
20         $this->bPartial = $bPartial;
21         $this->iSearchNameCount = $iSearchNameCount;
22     }
23
24     public function debugInfo()
25     {
26         return array(
27                 'ID' => $this->iId,
28                 'Type' => 'word',
29                 'Info' => array(
30                            'partial' => $this->bPartial,
31                            'count' => $this->iSearchNameCount
32                           )
33                );
34     }
35 }