]> git.openstreetmap.org Git - nominatim.git/blob - lib/TokenSpecialTerm.php
Migration.md - admin also need to run recreate db functions
[nominatim.git] / lib / TokenSpecialTerm.php
1 <?php
2
3 namespace Nominatim\Token;
4
5 require_once(CONST_BasePath.'/lib/SpecialSearchOperator.php');
6
7 /**
8  * A word token describing a place type.
9  */
10 class SpecialTerm
11 {
12     /// Database word id, if applicable.
13     public $iId;
14     /// Class (or OSM tag key) of the place to look for.
15     public $sClass;
16     /// Type (or OSM tag value) of the place to look for.
17     public $sType;
18     /// Relationship of the operator to the object (see Operator class).
19     public $iOperator;
20
21     public function __construct($iID, $sClass, $sType, $iOperator)
22     {
23         $this->iId = $iID;
24         $this->sClass = $sClass;
25         $this->sType = $sType;
26         $this->iOperator = $iOperator;
27     }
28
29     public function debugInfo()
30     {
31         return array(
32                 'ID' => $this->iId,
33                 'Type' => 'special term',
34                 'Info' => array(
35                            'class' => $this->sClass,
36                            'type' => $this->sType,
37                            'operator' => \Nominatim\Operator::toString($this->iOperator)
38                           )
39                );
40     }
41 }