1 | <?php |
||
25 | class AreaDescription extends ValueDescription { |
||
26 | |||
27 | /** |
||
28 | * Associative array containing the bounds of the area, or false when not set. |
||
29 | * |
||
30 | * @var float[]|false |
||
31 | */ |
||
32 | private $bounds = false; |
||
33 | |||
34 | /** |
||
35 | * @var SMWDIGeoCoord |
||
36 | */ |
||
37 | private $center; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $radius; |
||
43 | |||
44 | /** |
||
45 | * @param SMWDataItem $areaCenter |
||
46 | * @param string $comparator |
||
47 | * @param string $radius |
||
48 | * @param DIProperty|null $property |
||
49 | * |
||
50 | * @throws InvalidArgumentException |
||
51 | */ |
||
52 | public function __construct( SMWDataItem $areaCenter, $comparator, $radius, DIProperty $property = null ) { |
||
64 | |||
65 | /** |
||
66 | * @return float[] An associative array containing the limits with keys north, east, south and west. |
||
67 | */ |
||
68 | private function createBoundingBox() { |
||
86 | |||
87 | private function getPropertyCompat() { |
||
90 | |||
91 | /** |
||
92 | * @see \SMW\Query\Language\Description::getQueryString |
||
93 | * |
||
94 | * @param boolean $asValue |
||
95 | * @return string |
||
96 | */ |
||
97 | public function getQueryString( $asValue = false ) { |
||
105 | |||
106 | /** |
||
107 | * @see \SMW\Query\Language\Description::prune |
||
108 | */ |
||
109 | public function prune( &$maxsize, &$maxdepth, &$log ) { |
||
124 | |||
125 | /** |
||
126 | * Returns the bounds of the area. |
||
127 | * |
||
128 | * @since 0.6 |
||
129 | * |
||
130 | * @return array |
||
131 | */ |
||
132 | public function getBounds() { |
||
135 | |||
136 | /** |
||
137 | * @see \SMW\Query\Language\Description::getSQLCondition |
||
138 | * |
||
139 | * FIXME: store specific code should be in the store component |
||
140 | * |
||
141 | * @param string $tableName |
||
142 | * @param array $fieldNames |
||
143 | * @param DatabaseBase $dbs |
||
144 | * |
||
145 | * @return string or false |
||
146 | */ |
||
147 | public function getSQLCondition( $tableName, array $fieldNames, DatabaseBase $dbs ) { |
||
178 | |||
179 | } |