public function __construct(Point $point) { $this->entity = $point; $this->entityDTO = new PointDTO(); $this->entityDTO->latitude = $this->entity->getLatitude(); $this->entityDTO->longitude = $this->entity->getLongitude(); }
public function testCreateDefaults() { $point = new Point(); $this->assertEquals(0.0, $point->getLatitude(), '', FLOAT_DELTA); $this->assertEquals(0.0, $point->getLongitude(), '', FLOAT_DELTA); }
public function withDistance(Point $point) { return $this->addSelect('DISTANCE(Warehouse.address.point.latitude,Warehouse.address.point.longitude,' . $point->getLatitude() . ',' . $point->getLongitude() . ') AS distance'); }