<?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="fos_user.resetting.form.factory" class="FOS\UserBundle\Form\Factory\FormFactory">
            <argument type="service" id="form.factory" />
            <argument>%fos_user.resetting.form.name%</argument>
            <argument>%fos_user.resetting.form.type%</argument>
            <argument>%fos_user.resetting.form.validation_groups%</argument>
        </service>

        <service id="fos_user.resetting.form.type" class="FOS\UserBundle\Form\Type\ResettingFormType">
            <tag name="form.type" alias="fos_user_resetting" />
            <argument>%fos_user.model.user.class%</argument>
        </service>

        <service id="fos_user.listener.resetting" class="FOS\UserBundle\EventListener\ResettingListener">
            <tag name="kernel.event_subscriber" />
            <argument type="service" id="router" />
            <argument>%fos_user.resetting.token_ttl%</argument>
        </service>

        <service id="fos_user.resetting.controller" class="FOS\UserBundle\Controller\ResettingController" public="true">
            <argument type="service" id="event_dispatcher" />
            <argument type="service" id="fos_user.resetting.form.factory" />
            <argument type="service" id="fos_user.user_manager" />
            <argument type="service" id="fos_user.util.token_generator" />
            <argument type="service" id="fos_user.mailer" />
            <argument>%fos_user.resetting.retry_ttl%</argument>
            <call method="setContainer">
                <argument type="service" id="service_container" />
            </call>
        </service>

        <service id="FOS\UserBundle\Controller\ResettingController" alias="fos_user.resetting.controller" public="true" />
    </services>

</container>
