Download the PHP package luxifer/doctrine-functions without Composer
On this page you can find all versions of the php package luxifer/doctrine-functions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download luxifer/doctrine-functions
More information about luxifer/doctrine-functions
Files in luxifer/doctrine-functions
Package doctrine-functions
Short Description Doctrine DQL Functions for Mysql
License MIT
Homepage http://luxifer.github.io/doctrine-functions/
Informations about the package doctrine-functions
Doctrine Functions
This package contains doctrine functions, you can contribute by forking it and propose pull request with your own functions. List of available functions:
DATE(expr)
DATEDIFF(expr1, expr2)
DAYOFWEEK(expr)
WEEK(expr)
DAY(expr)
DAYOFMONTH(expr)
DAYOFYEAR(expr)
HOUR(expr)
MINUTE(expr)
MONTH(expr)
QUARTER(expr)
SECOND(expr)
TIME(expr)
YEAR(expr)
CONVERT_TZ(expr, 'from_tz', 'to_tz')
(MySQL)DATE_FORMAT(expr, 'format')
(MySQL)CONCAT_WS(separator, str1, str2, ...)
(MySQL)RAND()
(MySQL)MD5(expr)
(MySQL, Postgres)FROM_UNIXTIME(expr1, expr2)
(MySQL)
Edit this file in your pull request to add your functions to the list.
Requirements
This library is expected to work with PHP >= 5.3, but you should consider to upgrade to PHP >= 7.0. To contribute to this library you must have PHP >= 7.0 to run the test suite.
Installation
Just add the package to your composer.json
Integration
1) Doctrine Only
According to the Doctrine documentation you can register the functions in this package this way.
2) Using Symfony 2
With Symfony 2 you can register your functions directly in the config.yml
file.