for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\PostGIS;
use MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\BaseVariadicFunction;
/**
* Implementation of PostGIS ST_Relate() function.
*
* Tests if two geometries have a topological relationship matching an Intersection Matrix pattern,
* or computes their Intersection Matrix.
* @see https://postgis.net/docs/ST_Relate.html
* @since 3.5
* @author Martin Georgiev <[email protected]>
* @example Using it in DQL: "WHERE ST_Relate(g.geometry1, g.geometry2, 'T*T***T**') = TRUE"
* Returns boolean when 3 arguments provided, string (intersection matrix) when 2 arguments provided.
*/
class ST_Relate extends BaseVariadicFunction
{
protected function getNodeMappingPattern(): array
return ['StringPrimary'];
}
protected function getFunctionName(): string
return 'ST_Relate';
protected function getMinArgumentCount(): int
return 2;
protected function getMaxArgumentCount(): int
return 3;