alameda-red / doctrine-extensions-bundle
Alameda Doctrine 扩展包
0.0.2
2015-12-13 00:00 UTC
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-09 07:16:55 UTC
README
此包提供了一些数学 DQL 函数以在 Doctrine 中使用。此外,它还提供了一些 DBAL 类型。
安装
您可以通过修改 composer.json 来安装
{ "require" : { "alameda-red/doctrine-extensions-bundle" : "0.*" } }
或者运行
$ composer require "alameda-red/doctrine-extensions-bundle=0.*"
可用的 DQL 函数
- acos
- acosh
- asin
- asinh
- atan
- atan2
- atanh
- cos
- cosh
- degrees
- powe
- radians
- sin
- sinh
- tan
- tanh
还有一个 alameda_geo_distance 的 DQL 函数,但由于 Doctrine DQL 解析器的限制,目前无法使用。
可用的 DQL 类型
dateinterval
此类型将存储 \DateInterval 对象的字符串表示形式('PT1H', 'P1D', ...)。
timestamp
此类型将处理 UNIX 时间戳。