<?xml version="1.0" ?>

<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_rest.routing.loader.controller.class">FOS\RestBundle\Routing\Loader\RestRouteLoader</parameter>
        <parameter key="fos_rest.routing.loader.yaml_collection.class">FOS\RestBundle\Routing\Loader\RestYamlCollectionLoader</parameter>
        <parameter key="fos_rest.routing.loader.xml_collection.class">FOS\RestBundle\Routing\Loader\RestXmlCollectionLoader</parameter>
        <parameter key="fos_rest.routing.loader.processor.class">FOS\RestBundle\Routing\Loader\RestRouteProcessor</parameter>
        <parameter key="fos_rest.routing.loader.reader.controller.class">FOS\RestBundle\Routing\Loader\Reader\RestControllerReader</parameter>
        <parameter key="fos_rest.routing.loader.reader.action.class">FOS\RestBundle\Routing\Loader\Reader\RestActionReader</parameter>

    </parameters>

    <services>

        <service id="fos_rest.routing.loader.controller" class="%fos_rest.routing.loader.controller.class%">
            <argument type="service" id="service_container" />
            <argument type="service" id="file_locator" />
            <argument type="service" id="controller_name_converter" />
            <argument type="service" id="fos_rest.routing.loader.reader.controller" />
            <argument>%fos_rest.routing.loader.default_format%</argument>
            <tag name="routing.loader" />
        </service>

        <service id="fos_rest.routing.loader.processor" class="%fos_rest.routing.loader.processor.class%" />

        <service id="fos_rest.routing.loader.yaml_collection" class="%fos_rest.routing.loader.yaml_collection.class%">
            <argument type="service" id="file_locator" />
            <argument type="service" id="fos_rest.routing.loader.processor" />
            <argument>%fos_rest.routing.loader.include_format%</argument>
            <argument>%fos_rest.formats%</argument>
            <argument>%fos_rest.routing.loader.default_format%</argument>
            <tag name="routing.loader" />
        </service>

        <service id="fos_rest.routing.loader.xml_collection" class="%fos_rest.routing.loader.xml_collection.class%">
            <argument type="service" id="file_locator" />
            <argument type="service" id="fos_rest.routing.loader.processor" />
            <argument>%fos_rest.routing.loader.include_format%</argument>
            <argument>%fos_rest.formats%</argument>
            <argument>%fos_rest.routing.loader.default_format%</argument>
            <tag name="routing.loader" />
        </service>

        <service id="fos_rest.routing.loader.reader.controller" class="%fos_rest.routing.loader.reader.controller.class%">
            <argument type="service" id="fos_rest.routing.loader.reader.action" />
            <argument type="service" id="annotation_reader" />
        </service>

        <service id="fos_rest.routing.loader.reader.action" class="%fos_rest.routing.loader.reader.action.class%">
            <argument type="service" id="annotation_reader" />
            <argument type="service" id="fos_rest.request.param_fetcher.reader" />
            <argument type="service" id="fos_rest.inflector" />
            <argument>%fos_rest.routing.loader.include_format%</argument>
            <argument>%fos_rest.formats%</argument>
        </service>

    </services>

</container>
