forked from longitude-one/doctrine-spatial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SpMakeBox2D.php
74 lines (68 loc) · 1.92 KB
/
SpMakeBox2D.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* This file is part of the doctrine spatial extension.
*
* PHP 8.1
*
* (c) Alexandre Tranchant <alexandre.tranchant@gmail.com> 2017 - 2022
* (c) Longitude One 2020 - 2022
* (c) 2015 Derek J. Lambert
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace LongitudeOne\Spatial\ORM\Query\AST\Functions\PostgreSql;
use LongitudeOne\Spatial\ORM\Query\AST\Functions\AbstractSpatialDQLFunction;
/**
* ST_MakeBox2D DQL function.
*
* @author Tom Vogt <tom@lemuria.org>
* @author Alexandre Tranchant <alexandre.tranchant@gmail.com>
* @license https://alexandre-tranchant.mit-license.org
*/
class SpMakeBox2D extends AbstractSpatialDQLFunction
{
/**
* Function SQL name getter.
*
* @since 2.0 This function replace the protected property functionName.
*/
protected function getFunctionName(): string
{
return 'ST_MakeBox2D';
}
/**
* Maximum number of parameter for the spatial function.
*
* @since 2.0 This function replace the protected property maxGeomExpr.
*
* @return int the inherited methods shall NOT return null, but 0 when function has no parameter
*/
protected function getMaxParameter(): int
{
return 2;
}
/**
* Minimum number of parameter for the spatial function.
*
* @since 2.0 This function replace the protected property minGeomExpr.
*
* @return int the inherited methods shall NOT return null, but 0 when function has no parameter
*/
protected function getMinParameter(): int
{
return 2;
}
/**
* Get the platforms accepted.
*
* @since 2.0 This function replace the protected property platforms.
*
* @return string[] a non-empty array of accepted platforms
*/
protected function getPlatforms(): array
{
return ['postgresql'];
}
}