PHPackages                             morontt/doctrine-functions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. morontt/doctrine-functions

ActiveLibrary[Database &amp; ORM](/categories/database)

morontt/doctrine-functions
==========================

Additional DQL functions for Doctrine2

03.2kPHP

Since Oct 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/morontt/doctrine-functions)[ Packagist](https://packagist.org/packages/morontt/doctrine-functions)[ RSS](/packages/morontt-doctrine-functions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

doctrine-functions
==================

[](#doctrine-functions)

Additional DQL functions for Doctrine2

### Numeric functions

[](#numeric-functions)

- `RAND()` [ref](http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_rand)

### Datetime functions

[](#datetime-functions)

- `MONTH()` [ref](http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_month)

### String functions

[](#string-functions)

- `substr(string, from, count)` [ref](https://www.postgresql.org/docs/9.1/static/functions-string.html#FUNCTIONS-STRING-OTHER)

Installation
------------

[](#installation)

Just add the package to your `composer.json`

```
{
    "require": {
        "morontt/doctrine-functions": "dev-master"
    }
}
```

Integration
-----------

[](#integration)

### 1) Doctrine Only

[](#1-doctrine-only)

According to the [Doctrine documentation](http://docs.doctrine-project.org/en/latest/cookbook/dql-user-defined-functions.html) you can register the functions in this package this way.

```
