-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe64655
commit dabb80a
Showing
19 changed files
with
459 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Search\Dto\Search\Query\Facet; | ||
|
||
use Atoolo\Search\Dto\Search\Query\GeoPoint; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
class SpatialDistanceRangeFacet extends Facet | ||
{ | ||
public function __construct( | ||
string $key, | ||
public readonly GeoPoint $point, | ||
public readonly float $from, | ||
public readonly float $to, | ||
array $excludeFilter = [], | ||
) { | ||
parent::__construct($key, $excludeFilter); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Dto/Search/Query/Filter/SpatialArbitraryRectangleFilter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Search\Dto\Search\Query\Filter; | ||
|
||
use Atoolo\Search\Dto\Search\Query\GeoPoint; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
class SpatialArbitraryRectangleFilter extends Filter | ||
{ | ||
public function __construct( | ||
public readonly GeoPoint $lowerLeftCorner, | ||
public readonly GeoPoint $upperRightCorner, | ||
?string $key = null, | ||
) { | ||
parent::__construct($key); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Search\Dto\Search\Query\Filter; | ||
|
||
use Atoolo\Search\Dto\Search\Query\GeoPoint; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
class SpatialOrbitalFilter extends Filter | ||
{ | ||
public function __construct( | ||
/** The radial distance in kilometers */ | ||
public readonly float $distance, | ||
public readonly GeoPoint $centerPoint, | ||
public readonly SpatialOrbitalMode $mode = SpatialOrbitalMode::GREAT_CIRCLE_DISTANCE, | ||
?string $key = null, | ||
) { | ||
parent::__construct($key); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Search\Dto\Search\Query\Filter; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
enum SpatialOrbitalMode: string | ||
{ | ||
case GREAT_CIRCLE_DISTANCE = 'great-circle-distance'; | ||
case BOUNDING_BOX = 'bounding-box'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Search\Dto\Search\Query; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
class GeoPoint | ||
{ | ||
public function __construct( | ||
public readonly float $lng, | ||
public readonly float $lat, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Search\Dto\Search\Query\Sort; | ||
|
||
use Atoolo\Search\Dto\Search\Query\GeoPoint; | ||
|
||
/** | ||
* @codeCoverageIgnore | ||
*/ | ||
class SpatialDist extends Criteria | ||
{ | ||
public function __construct( | ||
Direction $direction, | ||
public readonly GeoPoint $point, | ||
) { | ||
parent::__construct($direction); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.