Sokil\Mongo\Expression::withinBox PHP 메소드

withinBox() 공개 메소드

Based on grid coordinates and does not query for GeoJSON shapes. Use planar geometry, so 2d index may be used but not required
public withinBox ( string $field, array $bottomLeftCoordinate, array $upperRightCoordinate ) : Expression
$field string
$bottomLeftCoordinate array Bottom left coordinate of box
$upperRightCoordinate array Upper right coordinate of box
리턴 Expression
    public function withinBox($field, array $bottomLeftCoordinate, array $upperRightCoordinate)
    {
        $this->where($field, array('$geoWithin' => array('$box' => array($bottomLeftCoordinate, $upperRightCoordinate))));
        return $this;
    }