lib/Doctrine/MongoDB/Query/Builder.php
public function spherical($spherical = true)
    {
        if ($this->query['type'] !== Query::TYPE_GEO_NEAR) {
            throw new BadMethodCallException('This method requires a geoNear command (call geoNear() first)');
        }

        $this->query['geoNear']['options']['spherical'] = $spherical;
        return $this;
    }
public function spherical($spherical = true)
    {
        if ($this->query['type'] !== Query::TYPE_GEO_NEAR) {
            throw new BadMethodCallException('This method requires a geoNear command (call geoNear() first)');
        }

        $this->query['geoNear']['options']['spherical'] = $spherical;
        return $this;
    }
public function spherical ( $ spherical = true ) { if ( $ this -> query [ 'type' ] !== Query :: TYPE_GEO_NEAR ) { throw new BadMethodCallException ( 'This method requires a geoNear command (call geoNear() first)' ) ; } $ this -> query [ 'geoNear' ] [ 'options' ] [ 'spherical' ] = $ spherical ; return $ this ; }
Set the "spherical" option for a geoNear command query.

@param bool $spherical
@return $this
@throws BadMethodCallException if the query is not a geoNear command
Set the spherical option for a geoNear command query .