|
@@ 595-604 (lines=10) @@
|
| 592 |
|
* @return $this |
| 593 |
|
* @throws \InvalidArgumentException if less than three points are given |
| 594 |
|
*/ |
| 595 |
|
public function geoWithinPolygon(/* array($x1, $y1), ... */) |
| 596 |
|
{ |
| 597 |
|
if (func_num_args() < 3) { |
| 598 |
|
throw new \InvalidArgumentException('Polygon must be defined by three or more points.'); |
| 599 |
|
} |
| 600 |
|
|
| 601 |
|
$shape = ['$polygon' => func_get_args()]; |
| 602 |
|
|
| 603 |
|
return $this->operator('$geoWithin', $shape); |
| 604 |
|
} |
| 605 |
|
|
| 606 |
|
/** |
| 607 |
|
* Return the current field. |
|
@@ 1491-1500 (lines=10) @@
|
| 1488 |
|
* @return $this |
| 1489 |
|
* @throws \InvalidArgumentException if less than three points are given |
| 1490 |
|
*/ |
| 1491 |
|
public function withinPolygon(/* array($x1, $y1), array($x2, $y2), ... */) |
| 1492 |
|
{ |
| 1493 |
|
if (func_num_args() < 3) { |
| 1494 |
|
throw new \InvalidArgumentException('Polygon must be defined by three or more points.'); |
| 1495 |
|
} |
| 1496 |
|
|
| 1497 |
|
$shape = ['$polygon' => func_get_args()]; |
| 1498 |
|
|
| 1499 |
|
return $this->operator('$within', $shape); |
| 1500 |
|
} |
| 1501 |
|
|
| 1502 |
|
/** |
| 1503 |
|
* Gets reference mapping for current field from current class or its descendants. |