From 886ccd5be40f690626ff610fcc7b3b40d72ef9a9 Mon Sep 17 00:00:00 2001 From: FlorianLB Date: Sat, 14 Dec 2013 15:34:42 +0100 Subject: [PATCH 1/2] switch custom DQL code example from multi-manager to single --- cookbook/doctrine/custom_dql_functions.rst | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/cookbook/doctrine/custom_dql_functions.rst b/cookbook/doctrine/custom_dql_functions.rst index 9c863055c08..57527ed3e1c 100644 --- a/cookbook/doctrine/custom_dql_functions.rst +++ b/cookbook/doctrine/custom_dql_functions.rst @@ -17,17 +17,14 @@ In Symfony, you can register your custom DQL functions as follows: doctrine: orm: # ... - entity_managers: - default: - # ... - dql: - string_functions: - test_string: Acme\HelloBundle\DQL\StringFunction - second_string: Acme\HelloBundle\DQL\SecondStringFunction - numeric_functions: - test_numeric: Acme\HelloBundle\DQL\NumericFunction - datetime_functions: - test_datetime: Acme\HelloBundle\DQL\DatetimeFunction + dql: + string_functions: + test_string: Acme\HelloBundle\DQL\StringFunction + second_string: Acme\HelloBundle\DQL\SecondStringFunction + numeric_functions: + test_numeric: Acme\HelloBundle\DQL\NumericFunction + datetime_functions: + test_datetime: Acme\HelloBundle\DQL\DatetimeFunction .. code-block:: xml From fd4f4f2cc94f0cbaaf7c6710ba65f437dff38238 Mon Sep 17 00:00:00 2001 From: FlorianLB Date: Sun, 15 Dec 2013 09:38:48 +0100 Subject: [PATCH 2/2] switch custom DQL code example from multi-manager to single (PHP and XML) --- cookbook/doctrine/custom_dql_functions.rst | 42 +++++++++------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/cookbook/doctrine/custom_dql_functions.rst b/cookbook/doctrine/custom_dql_functions.rst index 57527ed3e1c..35141309b5e 100644 --- a/cookbook/doctrine/custom_dql_functions.rst +++ b/cookbook/doctrine/custom_dql_functions.rst @@ -38,15 +38,12 @@ In Symfony, you can register your custom DQL functions as follows: - - - - Acme\HelloBundle\DQL\SecondStringFunction - Acme\HelloBundle\DQL\DatetimeFunction - - + + Acme\HelloBundle\DQL\SecondStringFunction + Acme\HelloBundle\DQL\DatetimeFunction + @@ -57,23 +54,16 @@ In Symfony, you can register your custom DQL functions as follows: $container->loadFromExtension('doctrine', array( 'orm' => array( // ... - - 'entity_managers' => array( - 'default' => array( - // ... - - 'dql' => array( - 'string_functions' => array( - 'test_string' => 'Acme\HelloBundle\DQL\StringFunction', - 'second_string' => 'Acme\HelloBundle\DQL\SecondStringFunction', - ), - 'numeric_functions' => array( - 'test_numeric' => 'Acme\HelloBundle\DQL\NumericFunction', - ), - 'datetime_functions' => array( - 'test_datetime' => 'Acme\HelloBundle\DQL\DatetimeFunction', - ), - ), + 'dql' => array( + 'string_functions' => array( + 'test_string' => 'Acme\HelloBundle\DQL\StringFunction', + 'second_string' => 'Acme\HelloBundle\DQL\SecondStringFunction', + ), + 'numeric_functions' => array( + 'test_numeric' => 'Acme\HelloBundle\DQL\NumericFunction', + ), + 'datetime_functions' => array( + 'test_datetime' => 'Acme\HelloBundle\DQL\DatetimeFunction', ), ), ),