浏览代码

[Doctrine] added XML support for previous merge

Fabien Potencier 14 年之前
父节点
当前提交
f9229fe6d8

+ 1 - 0
src/Symfony/Bundle/DoctrineBundle/Resources/config/schema/doctrine-1.0.xsd

@@ -90,6 +90,7 @@
             <xsd:element name="entity-manager" type="entity_manager" />
             <xsd:element name="mapping" type="mapping" />
             <xsd:element name="metadata-cache-driver" type="metadata_cache_driver" minOccurs="0" maxOccurs="1" />
+            <xsd:element name="dql" type="dql" minOccurs="0" maxOccurs="1" />
         </xsd:choice>
 
         <xsd:attribute name="auto-mapping" type="xsd:string" />

+ 20 - 0
src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/config/xml/orm_single_em_dql_functions.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" ?>
+
+<srv:container xmlns="http://symfony.com/schema/dic/doctrine"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:srv="http://symfony.com/schema/dic/services"
+    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
+                        http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd">
+
+    <config>
+        <dbal default-connection="default">
+            <connection name="default" dbname="db" />
+        </dbal>
+
+        <orm>
+            <dql>
+                <string-function name="test_string">Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestStringFunction</string-function>
+            </dql>
+        </orm>
+    </config>
+</srv:container>

+ 1 - 2
src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/config/yml/orm_single_em_dql_functions.yml

@@ -7,6 +7,5 @@ doctrine:
 
     orm:
         dql:
-            string_functions: 
+            string_functions:
                 test_string: Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestStringFunction
-