Add support for Doctrine ORM

This commit is contained in:
ornicar 2011-04-21 19:34:39 -07:00
parent fdd62293ed
commit 0ae6ef305f
2 changed files with 26 additions and 1 deletions

View file

@ -14,7 +14,7 @@ use InvalidArgumentException;
class FOQElasticaExtension extends Extension
{
protected $supportedProviderDrivers = array('mongodb');
protected $supportedProviderDrivers = array('mongodb', 'orm');
protected $typeMappings = array();
protected $loadedDoctrineDrivers = array();

25
Resources/config/orm.xml Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="foq_elastica.provider.prototype.orm" class="FOQ\ElasticaBundle\Provider\DoctrineProvider" public="false" abstract="true">
<argument /> <!-- index -->
<argument type="service" id="doctrine.orm.entity_manager" />
<argument type="service" id="foq_elastica.transformer.auto" />
<argument /> <!-- model -->
<argument type="collection" /> <!-- options -->
</service>
<service id="foq_elastica.mapper.prototype.orm" class="FOQ\ElasticaBundle\Mapper\DoctrineMapper" public="false">
<argument type="service" id="doctrine.orm.entity_manager" />
<argument /> <!-- model -->
<argument type="collection" /> <!-- options -->
</service>
</services>
</container>