1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Documentation for #991

This commit is contained in:
Matthieu Napoli 2014-05-16 09:32:52 +02:00
parent 47ca10076b
commit b16423b26b
2 changed files with 17 additions and 6 deletions

View File

@ -53,6 +53,17 @@ DQL query. ``$class`` is a string of a class-name which has to
extend ``Doctrine\ORM\Query\Node\FunctionNode``. This is a class
that offers all the necessary API and methods to implement a UDF.
Instead of providing the function class name, you can also provide
a callable that returns the function object:
.. code-block:: php
<?php
$config = new \Doctrine\ORM\Configuration();
$config->addCustomStringFunction($name, function () {
return new MyCustomFunction();
});
In this post we will implement some MySql specific Date calculation
methods, which are quite handy in my opinion:

View File

@ -401,8 +401,8 @@ class Configuration extends \Doctrine\DBAL\Configuration
*
* DQL function names are case-insensitive.
*
* @param string $name
* @param string $className
* @param string $name Function name.
* @param string|callable $className Class name or a callable that returns the function.
*
* @return void
*
@ -459,8 +459,8 @@ class Configuration extends \Doctrine\DBAL\Configuration
*
* DQL function names are case-insensitive.
*
* @param string $name
* @param string $className
* @param string $name Function name.
* @param string|callable $className Class name or a callable that returns the function.
*
* @return void
*
@ -517,8 +517,8 @@ class Configuration extends \Doctrine\DBAL\Configuration
*
* DQL function names are case-insensitive.
*
* @param string $name
* @param string $className
* @param string $name Function name.
* @param string|callable $className Class name or a callable that returns the function.
*
* @return void
*