浏览代码

[DoctrineBundle] Adding some XML examples

Jonathan H. Wage 15 年之前
父节点
当前提交
0472d0f0e2
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      src/Symfony/Framework/DoctrineBundle/README

+ 11 - 1
src/Symfony/Framework/DoctrineBundle/README

@@ -23,6 +23,10 @@ do the following:
       user: root
       user: root
       password: ~
       password: ~
 
 
+Or if you want to use XML instead of YAMl it would like like this:
+
+    <doctrine:dbal dbname="symfony_guestbook" user="root" password="" />
+
 Or if you have multiple connections and want to customize the configuration of the
 Or if you have multiple connections and want to customize the configuration of the
 connection further you can use the following:
 connection further you can use the following:
 
 
@@ -32,7 +36,7 @@ connection further you can use the following:
       connections:
       connections:
         default:
         default:
           driver:               PDOSqlite     # PDOSqlite, PDOMySql, PDOMsSql, PDOOracle, PDOPgSql, OCI8
           driver:               PDOSqlite     # PDOSqlite, PDOMySql, PDOMsSql, PDOOracle, PDOPgSql, OCI8
-          dbname:               symfony
+          dbname:               symfony_guestbook
           user:                 root
           user:                 root
           password:             null
           password:             null
           host:                 localhost
           host:                 localhost
@@ -43,6 +47,12 @@ connection further you can use the following:
           wrapper_class:        ~
           wrapper_class:        ~
           options:              []
           options:              []
 
 
+You can also specify multiple connections using the XML format:
+
+    <doctrine:dbal default_connection="default">
+        <doctrine:connection id="default" dbname="symfony_guestbook" user="root" password="" />
+    </doctrine:dbal>
+
 ### Object Relational Mapper
 ### Object Relational Mapper
 
 
 If you want to enable the Doctrine 2 ORM you can do so with the following:
 If you want to enable the Doctrine 2 ORM you can do so with the following: