orm.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?xml version="1.0" ?>
  2. <container xmlns="http://symfony.com/schema/dic/services"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  5. <parameters>
  6. <parameter key="doctrine.orm.configuration.class">Doctrine\ORM\Configuration</parameter>
  7. <parameter key="doctrine.orm.entity_manager.class">Doctrine\ORM\EntityManager</parameter>
  8. <parameter key="doctrine.orm.manager_configurator.class">Doctrine\Bundle\DoctrineBundle\ManagerConfigurator</parameter>
  9. <!-- cache -->
  10. <parameter key="doctrine.orm.cache.array.class">Doctrine\Common\Cache\ArrayCache</parameter>
  11. <parameter key="doctrine.orm.cache.apc.class">Doctrine\Common\Cache\ApcCache</parameter>
  12. <parameter key="doctrine.orm.cache.memcache.class">Doctrine\Common\Cache\MemcacheCache</parameter>
  13. <parameter key="doctrine.orm.cache.memcache_host">localhost</parameter>
  14. <parameter key="doctrine.orm.cache.memcache_port">11211</parameter>
  15. <parameter key="doctrine.orm.cache.memcache_instance.class">Memcache</parameter>
  16. <parameter key="doctrine.orm.cache.memcached.class">Doctrine\Common\Cache\MemcachedCache</parameter>
  17. <parameter key="doctrine.orm.cache.memcached_host">localhost</parameter>
  18. <parameter key="doctrine.orm.cache.memcached_port">11211</parameter>
  19. <parameter key="doctrine.orm.cache.memcached_instance.class">Memcached</parameter>
  20. <parameter key="doctrine.orm.cache.redis.class">Doctrine\Common\Cache\RedisCache</parameter>
  21. <parameter key="doctrine.orm.cache.redis_host">localhost</parameter>
  22. <parameter key="doctrine.orm.cache.redis_port">6379</parameter>
  23. <parameter key="doctrine.orm.cache.redis_instance.class">Redis</parameter>
  24. <parameter key="doctrine.orm.cache.xcache.class">Doctrine\Common\Cache\XcacheCache</parameter>
  25. <parameter key="doctrine.orm.cache.wincache.class">Doctrine\Common\Cache\WinCacheCache</parameter>
  26. <parameter key="doctrine.orm.cache.zenddata.class">Doctrine\Common\Cache\ZendDataCache</parameter>
  27. <!-- metadata -->
  28. <parameter key="doctrine.orm.metadata.driver_chain.class">Doctrine\Persistence\Mapping\Driver\MappingDriverChain</parameter>
  29. <parameter key="doctrine.orm.metadata.annotation.class">Doctrine\ORM\Mapping\Driver\AnnotationDriver</parameter>
  30. <parameter key="doctrine.orm.metadata.xml.class">Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver</parameter>
  31. <parameter key="doctrine.orm.metadata.yml.class">Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver</parameter>
  32. <parameter key="doctrine.orm.metadata.php.class">Doctrine\ORM\Mapping\Driver\PHPDriver</parameter>
  33. <parameter key="doctrine.orm.metadata.staticphp.class">Doctrine\ORM\Mapping\Driver\StaticPHPDriver</parameter>
  34. <!-- cache warmer -->
  35. <parameter key="doctrine.orm.proxy_cache_warmer.class">Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer</parameter>
  36. <!-- form field factory guesser -->
  37. <parameter key="form.type_guesser.doctrine.class">Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser</parameter>
  38. <!-- validator -->
  39. <parameter key="doctrine.orm.validator.unique.class">Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator</parameter>
  40. <parameter key="doctrine.orm.validator_initializer.class">Symfony\Bridge\Doctrine\Validator\DoctrineInitializer</parameter>
  41. <!-- security -->
  42. <parameter key="doctrine.orm.security.user.provider.class">Symfony\Bridge\Doctrine\Security\User\EntityUserProvider</parameter>
  43. <!-- listeners -->
  44. <parameter key="doctrine.orm.listeners.resolve_target_entity.class">Doctrine\ORM\Tools\ResolveTargetEntityListener</parameter>
  45. <parameter key="doctrine.orm.listeners.attach_entity_listeners.class">Doctrine\ORM\Tools\AttachEntityListenersListener</parameter>
  46. <!-- naming strategy -->
  47. <parameter key="doctrine.orm.naming_strategy.default.class">Doctrine\ORM\Mapping\DefaultNamingStrategy</parameter>
  48. <parameter key="doctrine.orm.naming_strategy.underscore.class">Doctrine\ORM\Mapping\UnderscoreNamingStrategy</parameter>
  49. <!-- quote strategy -->
  50. <parameter key="doctrine.orm.quote_strategy.default.class">Doctrine\ORM\Mapping\DefaultQuoteStrategy</parameter>
  51. <parameter key="doctrine.orm.quote_strategy.ansi.class">Doctrine\ORM\Mapping\AnsiQuoteStrategy</parameter>
  52. <!-- entity listener resolver -->
  53. <parameter key="doctrine.orm.entity_listener_resolver.class">Doctrine\Bundle\DoctrineBundle\Mapping\ContainerEntityListenerResolver</parameter>
  54. <!-- second level cache -->
  55. <parameter key="doctrine.orm.second_level_cache.default_cache_factory.class">Doctrine\ORM\Cache\DefaultCacheFactory</parameter>
  56. <parameter key="doctrine.orm.second_level_cache.default_region.class">Doctrine\ORM\Cache\Region\DefaultRegion</parameter>
  57. <parameter key="doctrine.orm.second_level_cache.filelock_region.class">Doctrine\ORM\Cache\Region\FileLockRegion</parameter>
  58. <parameter key="doctrine.orm.second_level_cache.logger_chain.class">Doctrine\ORM\Cache\Logging\CacheLoggerChain</parameter>
  59. <parameter key="doctrine.orm.second_level_cache.logger_statistics.class">Doctrine\ORM\Cache\Logging\StatisticsCacheLogger</parameter>
  60. <parameter key="doctrine.orm.second_level_cache.cache_configuration.class">Doctrine\ORM\Cache\CacheConfiguration</parameter>
  61. <parameter key="doctrine.orm.second_level_cache.regions_configuration.class">Doctrine\ORM\Cache\RegionsConfiguration</parameter>
  62. </parameters>
  63. <services>
  64. <service id="Doctrine\ORM\EntityManagerInterface" alias="doctrine.orm.entity_manager" public="false" />
  65. <!--- Internal Annotation Metadata Reader Service alias, use annotation_reader service -->
  66. <service id="doctrine.orm.metadata.annotation_reader" alias="annotation_reader" public="false" />
  67. <service id="doctrine.orm.proxy_cache_warmer" class="%doctrine.orm.proxy_cache_warmer.class%" public="false">
  68. <tag name="kernel.cache_warmer" />
  69. <argument type="service" id="doctrine" />
  70. </service>
  71. <service id="form.type_guesser.doctrine" class="%form.type_guesser.doctrine.class%">
  72. <tag name="form.type_guesser" />
  73. <argument type="service" id="doctrine" />
  74. </service>
  75. <service id="form.type.entity" class="Symfony\Bridge\Doctrine\Form\Type\EntityType">
  76. <tag name="form.type" alias="entity" />
  77. <argument type="service" id="doctrine" />
  78. </service>
  79. <service id="doctrine.orm.configuration" class="%doctrine.orm.configuration.class%" abstract="true" public="false" />
  80. <service id="doctrine.orm.entity_manager.abstract" class="%doctrine.orm.entity_manager.class%" abstract="true" lazy="true">
  81. <factory class="%doctrine.orm.entity_manager.class%" method="create" />
  82. </service>
  83. <service id="doctrine.orm.container_repository_factory" class="Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory" public="false">
  84. <argument type="service">
  85. <service class="Symfony\Component\DependencyInjection\ServiceLocator">
  86. <argument type="collection" />
  87. </service>
  88. </argument>
  89. </service>
  90. <!-- The configurator cannot be a private service -->
  91. <service id="doctrine.orm.manager_configurator.abstract" class="%doctrine.orm.manager_configurator.class%" abstract="true">
  92. <argument type="collection" />
  93. <argument type="collection" />
  94. </service>
  95. <!-- validator -->
  96. <service id="doctrine.orm.validator.unique" class="%doctrine.orm.validator.unique.class%">
  97. <tag name="validator.constraint_validator" alias="doctrine.orm.validator.unique" />
  98. <argument type="service" id="doctrine" />
  99. </service>
  100. <service id="doctrine.orm.validator_initializer" class="%doctrine.orm.validator_initializer.class%">
  101. <tag name="validator.initializer" />
  102. <argument type="service" id="doctrine" />
  103. </service>
  104. <!-- security -->
  105. <service id="doctrine.orm.security.user.provider" class="%doctrine.orm.security.user.provider.class%" abstract="true" public="false">
  106. <argument type="service" id="doctrine" />
  107. </service>
  108. <!-- listeners -->
  109. <service id="doctrine.orm.listeners.resolve_target_entity" class="%doctrine.orm.listeners.resolve_target_entity.class%" public="false" />
  110. <service id="doctrine.orm.listeners.pdo_cache_adapter_doctrine_schema_subscriber" class="Symfony\Bridge\Doctrine\SchemaListener\PdoCacheAdapterDoctrineSchemaSubscriber">
  111. <argument type="collection" /> <!-- PdoAdapter instances -->
  112. <tag name="doctrine.event_subscriber" />
  113. </service>
  114. <!-- naming strategy -->
  115. <service id="doctrine.orm.naming_strategy.default" class="%doctrine.orm.naming_strategy.default.class%" public="false" />
  116. <service id="doctrine.orm.naming_strategy.underscore" class="%doctrine.orm.naming_strategy.underscore.class%" public="false" />
  117. <service id="doctrine.orm.naming_strategy.underscore_number_aware" class="%doctrine.orm.naming_strategy.underscore.class%" public="false">
  118. <argument type="constant">CASE_LOWER</argument>
  119. <argument>true</argument>
  120. </service>
  121. <!-- quote strategy -->
  122. <service id="doctrine.orm.quote_strategy.default" class="%doctrine.orm.quote_strategy.default.class%" public="false" />
  123. <service id="doctrine.orm.quote_strategy.ansi" class="%doctrine.orm.quote_strategy.ansi.class%" public="false" />
  124. <!-- custom id generators -->
  125. <service id="doctrine.ulid_generator" class="Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator">
  126. <argument type="service" id="ulid.factory" on-invalid="ignore" />
  127. <tag name="doctrine.id_generator" />
  128. </service>
  129. <service id="doctrine.uuid_generator" class="Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator">
  130. <argument type="service" id="uuid.factory" on-invalid="ignore" />
  131. <tag name="doctrine.id_generator" />
  132. </service>
  133. <!-- commands -->
  134. <service id="doctrine.cache_clear_metadata_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\ClearMetadataCacheDoctrineCommand">
  135. <tag name="console.command" command="doctrine:cache:clear-metadata" />
  136. </service>
  137. <service id="doctrine.cache_clear_query_cache_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\ClearQueryCacheDoctrineCommand">
  138. <tag name="console.command" command="doctrine:cache:clear-query" />
  139. </service>
  140. <service id="doctrine.cache_clear_result_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\ClearResultCacheDoctrineCommand">
  141. <tag name="console.command" command="doctrine:cache:clear-result" />
  142. </service>
  143. <service id="doctrine.cache_collection_region_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\CollectionRegionDoctrineCommand">
  144. <tag name="console.command" command="doctrine:cache:clear-collection-region" />
  145. </service>
  146. <service id="doctrine.mapping_convert_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\ConvertMappingDoctrineCommand">
  147. <tag name="console.command" command="doctrine:mapping:convert" />
  148. </service>
  149. <service id="doctrine.schema_create_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\CreateSchemaDoctrineCommand">
  150. <tag name="console.command" command="doctrine:schema:create" />
  151. </service>
  152. <service id="doctrine.schema_drop_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\DropSchemaDoctrineCommand">
  153. <tag name="console.command" command="doctrine:schema:drop" />
  154. </service>
  155. <service id="doctrine.ensure_production_settings_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\EnsureProductionSettingsDoctrineCommand">
  156. <tag name="console.command" command="doctrine:ensure-production-settings" />
  157. </service>
  158. <service id="doctrine.clear_entity_region_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\EntityRegionCacheDoctrineCommand">
  159. <tag name="console.command" command="doctrine:cache:clear-entity-region" />
  160. </service>
  161. <service id="doctrine.mapping_info_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\InfoDoctrineCommand">
  162. <tag name="console.command" command="doctrine:mapping:info" />
  163. </service>
  164. <service id="doctrine.clear_query_region_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\QueryRegionCacheDoctrineCommand">
  165. <tag name="console.command" command="doctrine:cache:clear-query-region" />
  166. </service>
  167. <service id="doctrine.query_dql_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\RunDqlDoctrineCommand">
  168. <tag name="console.command" command="doctrine:query:dql" />
  169. </service>
  170. <service id="doctrine.schema_update_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\UpdateSchemaDoctrineCommand">
  171. <tag name="console.command" command="doctrine:schema:update" />
  172. </service>
  173. <service id="doctrine.schema_validate_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\ValidateSchemaCommand">
  174. <tag name="console.command" command="doctrine:schema:validate" />
  175. </service>
  176. <service id="doctrine.mapping_import_command" class="Doctrine\Bundle\DoctrineBundle\Command\ImportMappingDoctrineCommand">
  177. <argument type="service" id="doctrine" />
  178. <argument>%kernel.bundles%</argument>
  179. <tag name="console.command" command="doctrine:mapping:import" />
  180. </service>
  181. </services>
  182. </container>