Skip to content

Commit 73dd7e0

Browse files
committed
Adding a configuration block
1 parent fc3c872 commit 73dd7e0

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

book/doctrine.rst

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -117,36 +117,38 @@ for you:
117117
If you want to use SQLite as your database, you need to set the path
118118
where your database file should be stored:
119119

120-
.. code-block:: yaml
121-
122-
# app/config/config.yml
123-
doctrine:
124-
dbal:
125-
driver: pdo_sqlite
126-
path: "%kernel.root_dir%/sqlite.db"
127-
charset: UTF8
128-
129-
.. code-block:: xml
120+
.. configuration-block::
130121

131-
<!-- app/config/config.xml -->
132-
<doctrine:config
133-
driver="pdo_sqlite"
134-
path="%kernel.root_dir%/sqlite.db"
135-
charset="UTF-8"
136-
>
137-
<!-- ... -->
138-
</doctrine:config>
122+
.. code-block:: yaml
123+
124+
# app/config/config.yml
125+
doctrine:
126+
dbal:
127+
driver: pdo_sqlite
128+
path: "%kernel.root_dir%/sqlite.db"
129+
charset: UTF8
130+
131+
.. code-block:: xml
139132
140-
.. code-block:: php
141-
142-
// app/config/config.php
143-
$container->loadFromExtension('doctrine', array(
144-
'dbal' => array(
145-
'driver' => 'pdo_sqlite',
146-
'path' => '%kernel.root_dir%/sqlite.db',
147-
'charset' => 'UTF-8',
148-
),
149-
));
133+
<!-- app/config/config.xml -->
134+
<doctrine:config
135+
driver="pdo_sqlite"
136+
path="%kernel.root_dir%/sqlite.db"
137+
charset="UTF-8"
138+
>
139+
<!-- ... -->
140+
</doctrine:config>
141+
142+
.. code-block:: php
143+
144+
// app/config/config.php
145+
$container->loadFromExtension('doctrine', array(
146+
'dbal' => array(
147+
'driver' => 'pdo_sqlite',
148+
'path' => '%kernel.root_dir%/sqlite.db',
149+
'charset' => 'UTF-8',
150+
),
151+
));
150152
151153
Creating an Entity Class
152154
~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)