55DoctrineBundle Configuration ("doctrine")
66=========================================
77
8- Full default configuration
8+ Full Default Configuration
99--------------------------
1010
1111.. configuration-block ::
@@ -180,8 +180,10 @@ Full default configuration
180180 <container xmlns =" http://symfony.com/schema/dic/services"
181181 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
182182 xmlns : doctrine =" http://symfony.com/schema/dic/doctrine"
183- xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
184- http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd" >
183+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
184+ http://symfony.com/schema/dic/services/services-1.0.xsd
185+ http://symfony.com/schema/dic/doctrine
186+ http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd" >
185187
186188 <doctrine : config >
187189 <doctrine : dbal default-connection =" default" >
@@ -209,16 +211,44 @@ Full default configuration
209211 <doctrine : type name =" custom" >Acme\HelloBundle\MyCustomType</doctrine : type >
210212 </doctrine : dbal >
211213
212- <doctrine : orm default-entity-manager =" default" auto-generate-proxy-classes =" false" proxy-namespace =" Proxies" proxy-dir =" %kernel.cache_dir%/doctrine/orm/Proxies" >
213- <doctrine : entity-manager name =" default" query-cache-driver =" array" result-cache-driver =" array" connection =" conn1" class-metadata-factory-name =" Doctrine\ORM\Mapping\ClassMetadataFactory" >
214- <doctrine : metadata-cache-driver type =" memcache" host =" localhost" port =" 11211" instance-class =" Memcache" class =" Doctrine\Common\Cache\MemcacheCache" />
214+ <doctrine : orm
215+ default-entity-manager =" default"
216+ auto-generate-proxy-classes =" false"
217+ proxy-namespace =" Proxies"
218+ proxy-dir =" %kernel.cache_dir%/doctrine/orm/Proxies"
219+ >
220+ <doctrine : entity-manager
221+ name =" default"
222+ query-cache-driver =" array"
223+ result-cache-driver =" array"
224+ connection =" conn1"
225+ class-metadata-factory-name =" Doctrine\ORM\Mapping\ClassMetadataFactory"
226+ >
227+ <doctrine : metadata-cache-driver
228+ type =" memcache"
229+ host =" localhost"
230+ port =" 11211"
231+ instance-class =" Memcache"
232+ class =" Doctrine\Common\Cache\MemcacheCache"
233+ />
234+
215235 <doctrine : mapping name =" AcmeHelloBundle" />
236+
216237 <doctrine : dql >
217- <doctrine : string-function name =" test_string" >Acme\HelloBundle\DQL\StringFunction</doctrine : string-function >
218- <doctrine : numeric-function name =" test_numeric" >Acme\HelloBundle\DQL\NumericFunction</doctrine : numeric-function >
219- <doctrine : datetime-function name =" test_datetime" >Acme\HelloBundle\DQL\DatetimeFunction</doctrine : datetime-function >
238+ <doctrine : string-function name =" test_string" >
239+ Acme\HelloBundle\DQL\StringFunction
240+ </doctrine : string-function >
241+
242+ <doctrine : numeric-function name =" test_numeric" >
243+ Acme\HelloBundle\DQL\NumericFunction
244+ </doctrine : numeric-function >
245+
246+ <doctrine : datetime-function name =" test_datetime" >
247+ Acme\HelloBundle\DQL\DatetimeFunction
248+ </doctrine : datetime-function >
220249 </doctrine : dql >
221250 </doctrine : entity-manager >
251+
222252 <doctrine : entity-manager name =" em2" connection =" conn2" metadata-cache-driver =" apc" >
223253 <doctrine : mapping
224254 name =" DoctrineExtensions"
@@ -235,8 +265,8 @@ Full default configuration
235265 Configuration Overview
236266----------------------
237267
238- This following configuration example shows all the configuration defaults that
239- the ORM resolves to:
268+ This following configuration example shows all the configuration defaults
269+ that the ORM resolves to:
240270
241271.. code-block :: yaml
242272
@@ -258,8 +288,8 @@ certain classes, but those are for very advanced use-cases only.
258288Caching Drivers
259289~~~~~~~~~~~~~~~
260290
261- For the caching drivers you can specify the values "array", "apc", "memcache", "memcached",
262- "xcache" or "service".
291+ For the caching drivers you can specify the values "array", "apc", "memcache",
292+ "memcached", " xcache" or "service".
263293
264294The following example shows an overview of the caching configurations:
265295
@@ -282,34 +312,34 @@ Mapping Configuration
282312~~~~~~~~~~~~~~~~~~~~~
283313
284314Explicit definition of all the mapped entities is the only necessary
285- configuration for the ORM and there are several configuration options that you
286- can control. The following configuration options exist for a mapping:
315+ configuration for the ORM and there are several configuration options that
316+ you can control. The following configuration options exist for a mapping:
287317
288318* ``type `` One of ``annotation ``, ``xml ``, ``yml ``, ``php `` or ``staticphp ``.
289319 This specifies which type of metadata type your mapping uses.
290320
291- * ``dir `` Path to the mapping or entity files (depending on the driver). If
292- this path is relative it is assumed to be relative to the bundle root. This
293- only works if the name of your mapping is a bundle name. If you want to use
294- this option to specify absolute paths you should prefix the path with the
295- kernel parameters that exist in the DIC (for example %kernel.root_dir%).
321+ * ``dir `` Path to the mapping or entity files (depending on the driver).
322+ If this path is relative it is assumed to be relative to the bundle root.
323+ This only works if the name of your mapping is a bundle name. If you want
324+ to use this option to specify absolute paths you should prefix the path
325+ with the kernel parameters that exist in the DIC (for example `` %kernel.root_dir% `` ).
296326
297327* ``prefix `` A common namespace prefix that all entities of this mapping
298328 share. This prefix should never conflict with prefixes of other defined
299- mappings otherwise some of your entities cannot be found by Doctrine. This
300- option defaults to the bundle namespace + ``Entity ``, for example for an
301- application bundle called ``AcmeHelloBundle `` prefix would be
329+ mappings otherwise some of your entities cannot be found by Doctrine.
330+ This option defaults to the bundle namespace + ``Entity ``, for example
331+ for an application bundle called ``AcmeHelloBundle `` prefix would be
302332 ``Acme\HelloBundle\Entity ``.
303333
304334* ``alias `` Doctrine offers a way to alias entity namespaces to simpler,
305- shorter names to be used in DQL queries or for Repository access. When using
306- a bundle the alias defaults to the bundle name.
335+ shorter names to be used in DQL queries or for Repository access. When
336+ using a bundle the alias defaults to the bundle name.
307337
308- * ``is_bundle `` This option is a derived value from ``dir `` and by default is
309- set to true if dir is relative proved by a ``file_exists() `` check that
310- returns false. It is false if the existence check returns true. In this case
311- an absolute path was specified and the metadata files are most likely in a
312- directory outside of a bundle.
338+ * ``is_bundle `` This option is a derived value from ``dir `` and by default
339+ is set to true if dir is relative proved by a ``file_exists() `` check
340+ that returns false. It is false if the existence check returns true. In
341+ this case an absolute path was specified and the metadata files are most
342+ likely in a directory outside of a bundle.
313343
314344.. index ::
315345 single: Configuration; Doctrine DBAL
@@ -363,8 +393,11 @@ The following block shows all possible configuration keys:
363393 <container xmlns =" http://symfony.com/schema/dic/services"
364394 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
365395 xmlns : doctrine =" http://symfony.com/schema/dic/doctrine"
366- xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
367- http://symfony.com/schema/dic/doctrine http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd" >
396+ xsi : schemaLocation =" http://symfony.com/schema/dic/services
397+ http://symfony.com/schema/dic/services/services-1.0.xsd
398+ http://symfony.com/schema/dic/doctrine
399+ http://symfony.com/schema/dic/doctrine/doctrine-1.0.xsd"
400+ >
368401
369402 <doctrine : config >
370403 <doctrine : dbal
0 commit comments