Add support for Doctrine ORM
This commit is contained in:
parent
fdd62293ed
commit
0ae6ef305f
|
@ -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
25
Resources/config/orm.xml
Normal 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>
|
Loading…
Reference in a new issue