@@ -17,17 +17,14 @@ In Symfony, you can register your custom DQL functions as follows:
17
17
doctrine :
18
18
orm :
19
19
# ...
20
- entity_managers :
21
- default :
22
- # ...
23
- dql :
24
- string_functions :
25
- test_string : Acme\HelloBundle\DQL\StringFunction
26
- second_string : Acme\HelloBundle\DQL\SecondStringFunction
27
- numeric_functions :
28
- test_numeric : Acme\HelloBundle\DQL\NumericFunction
29
- datetime_functions :
30
- test_datetime : Acme\HelloBundle\DQL\DatetimeFunction
20
+ dql :
21
+ string_functions :
22
+ test_string : Acme\HelloBundle\DQL\StringFunction
23
+ second_string : Acme\HelloBundle\DQL\SecondStringFunction
24
+ numeric_functions :
25
+ test_numeric : Acme\HelloBundle\DQL\NumericFunction
26
+ datetime_functions :
27
+ test_datetime : Acme\HelloBundle\DQL\DatetimeFunction
31
28
32
29
.. code-block :: xml
33
30
@@ -41,15 +38,12 @@ In Symfony, you can register your custom DQL functions as follows:
41
38
<doctrine : config >
42
39
<doctrine : orm >
43
40
<!-- ... -->
44
- <doctrine : entity-manager name =" default" >
45
- <!-- ... -->
46
- <doctrine : dql >
47
- <doctrine : string-function name =" test_string>Acme\HelloBundle\DQL\StringFunction</doctrine:string-function>
48
- <doctrine:string-function name=" second_string>Acme\HelloBundle\DQL\SecondStringFunction</doctrine : string-function >
49
- <doctrine : numeric-function name =" test_numeric>Acme\HelloBundle\DQL\NumericFunction</doctrine:numeric-function>
50
- <doctrine:datetime-function name=" test_datetime>Acme\HelloBundle\DQL\DatetimeFunction</doctrine : datetime-function >
51
- </doctrine : dql >
52
- </doctrine : entity-manager >
41
+ <doctrine : dql >
42
+ <doctrine : string-function name =" test_string>Acme\HelloBundle\DQL\StringFunction</doctrine:string-function>
43
+ <doctrine:string-function name=" second_string>Acme\HelloBundle\DQL\SecondStringFunction</doctrine : string-function >
44
+ <doctrine : numeric-function name =" test_numeric>Acme\HelloBundle\DQL\NumericFunction</doctrine:numeric-function>
45
+ <doctrine:datetime-function name=" test_datetime>Acme\HelloBundle\DQL\DatetimeFunction</doctrine : datetime-function >
46
+ </doctrine : dql >
53
47
</doctrine : orm >
54
48
</doctrine : config >
55
49
</container >
@@ -60,23 +54,16 @@ In Symfony, you can register your custom DQL functions as follows:
60
54
$container->loadFromExtension('doctrine', array(
61
55
'orm' => array(
62
56
// ...
63
-
64
- 'entity_managers' => array(
65
- 'default' => array(
66
- // ...
67
-
68
- 'dql' => array(
69
- 'string_functions' => array(
70
- 'test_string' => 'Acme\HelloBundle\DQL\StringFunction',
71
- 'second_string' => 'Acme\HelloBundle\DQL\SecondStringFunction',
72
- ),
73
- 'numeric_functions' => array(
74
- 'test_numeric' => 'Acme\HelloBundle\DQL\NumericFunction',
75
- ),
76
- 'datetime_functions' => array(
77
- 'test_datetime' => 'Acme\HelloBundle\DQL\DatetimeFunction',
78
- ),
79
- ),
57
+ 'dql' => array(
58
+ 'string_functions' => array(
59
+ 'test_string' => 'Acme\HelloBundle\DQL\StringFunction',
60
+ 'second_string' => 'Acme\HelloBundle\DQL\SecondStringFunction',
61
+ ),
62
+ 'numeric_functions' => array(
63
+ 'test_numeric' => 'Acme\HelloBundle\DQL\NumericFunction',
64
+ ),
65
+ 'datetime_functions' => array(
66
+ 'test_datetime' => 'Acme\HelloBundle\DQL\DatetimeFunction',
80
67
),
81
68
),
82
69
),
0 commit comments