src/Query/Geo/GeoShapeQuery.php
public function addShape($field, $type, array $coordinates, $relation = self::INTERSECTS, array $parameters = [])
    {
        // TODO: remove this in the next major version
        if (is_array($relation)) {
            $parameters = $relation;
            $relation = self::INTERSECTS;
            trigger_error('$parameters as parameter 4 in addShape is deprecated', E_USER_DEPRECATED);
        }

        $filter = array_merge(
            $parameters,
            [
                'type' => $type,
                'coordinates' => $coordinates,
            ]
        );

        $this->fields[$field] = [
            'shape' => $filter,
            'relation' => $relation,
        ];
    }
public function addShape($field, $type, array $coordinates, $relation = self::INTERSECTS, array $parameters = [])
    {
        // TODO: remove this in the next major version
        if (is_array($relation)) {
            $parameters = $relation;
            $relation = self::INTERSECTS;
            trigger_error('$parameters as parameter 4 in addShape is deprecated', E_USER_DEPRECATED);
        }

        $filter = array_merge(
            $parameters,
            [
                'type' => $type,
                'coordinates' => $coordinates,
            ]
        );

        $this->fields[$field] = [
            'shape' => $filter,
            'relation' => $relation,
        ];
    }
public function addShape ( $ field , $ type , array $ coordinates , $ relation = self :: INTERSECTS , array $ parameters = [ ] ) { // TODO: remove this in the next major version if ( is_array ( $ relation ) ) { $ parameters = $ relation ; $ relation = self :: INTERSECTS ; trigger_error ( '$parameters as parameter 4 in addShape is deprecated' , E_USER_DEPRECATED ) ; } $ filter = array_merge ( $ parameters , [ 'type' => $ type , 'coordinates' => $ coordinates , ] ) ; $ this -> fields [ $ field ] = [ 'shape' => $ filter , 'relation' => $ relation , ] ; }
Add geo-shape provided filter.

@param string $field       Field name.
@param string $type        Shape type.
@param array  $coordinates Shape coordinates.
@param string $relation    Spatial relation.
@param array  $parameters  Additional parameters.
Add geo - shape provided filter .