Add configuration items for doctrine spatial add-on

This commit is contained in:
Kendrick Chan 2018-01-12 21:47:29 +08:00
parent 0f5889f23c
commit ae6c1c7c35

View file

@ -14,6 +14,11 @@ doctrine:
# With Symfony 3.3, remove the `resolve:` prefix
url: '%env(resolve:DATABASE_URL)%'
types:
geometry: CrEOF\Spatial\DBAL\Types\GeometryType
point: CrEOF\Spatial\DBAL\Types\Geometry\PointType
polygon: CrEOF\Spatial\DBAL\Types\Geometry\PolygonType
linestring: CrEOF\Spatial\DBAL\Types\Geometry\LineStringType
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
@ -25,3 +30,12 @@ doctrine:
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
dql:
numeric_functions:
st_contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STContains
contains: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Contains
st_area: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Area
st_geomfromtext: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\GeomFromText
st_intersects: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STIntersects
st_buffer: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\STBuffer
point: CrEOF\Spatial\ORM\Query\AST\Functions\MySql\Point