<?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">

    <parameters>
        <parameter key="fos_user.user_manager.class">FOS\UserBundle\Doctrine\UserManager</parameter>
    </parameters>

    <services>
        <service id="fos_user.user_manager.default" class="%fos_user.user_manager.class%">
            <argument type="service" id="security.encoder_factory" />
            <argument type="service" id="fos_user.util.username_canonicalizer" />
            <argument type="service" id="fos_user.util.email_canonicalizer" />
            <argument type="service" id="fos_user.document_manager" />
            <argument>%fos_user.model.user.class%</argument>
        </service>

        <service id="fos_user.document_manager" factory-service="doctrine_couchdb" factory-method="getManager" class="Doctrine\ODM\CouchDB\DocumentManager" public="false">
            <argument>%fos_user.model_manager_name%</argument>
        </service>

        <service id="fos_user.user_listener" class="FOS\UserBundle\CouchDocument\UserListener" public="false">
            <argument type="service" id="service_container" />
        </service>
    </services>

</container>