[DoctrineBundle] Adding some XML examples

This commit is contained in:
Jonathan H. Wage 2010-02-25 15:21:42 -05:00 committed by Fabien Potencier
parent 85ed6df2f0
commit 0472d0f0e2

View File

@ -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: