<?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="cmf_routing.uri_filter_regexp">null</parameter>
    </parameters>

    <services>
        <service id="cmf_routing.enhancer.route_content" class="Symfony\Cmf\Component\Routing\Enhancer\RouteContentEnhancer">
            <argument>_route_object</argument>
            <argument>_content</argument>
            <tag name="dynamic_router_route_enhancer" priority="100"/>
        </service>

        <service id="cmf_routing.enhancer.default_controller" class="Symfony\Cmf\Component\Routing\Enhancer\FieldPresenceEnhancer" public="false">
            <argument>null</argument>
            <argument>_controller</argument>
            <argument>%cmf_routing.default_controller%</argument>
        </service>

        <service id="cmf_routing.enhancer.explicit_template" class="Symfony\Cmf\Component\Routing\Enhancer\FieldPresenceEnhancer" public="false">
            <argument>_template</argument>
            <argument>_controller</argument>
            <argument>%cmf_routing.generic_controller%</argument>
        </service>

        <service id="cmf_routing.enhancer.controllers_by_type" class="Symfony\Cmf\Component\Routing\Enhancer\FieldMapEnhancer" public="false">
            <argument>type</argument>
            <argument>_controller</argument>
            <argument>%cmf_routing.controllers_by_type%</argument>
        </service>

        <service id="cmf_routing.enhancer.controllers_by_class" class="Symfony\Cmf\Component\Routing\Enhancer\FieldByClassEnhancer" public="false">
            <argument>_content</argument>
            <argument>_controller</argument>
            <argument>%cmf_routing.controllers_by_class%</argument>
        </service>

        <service id="cmf_routing.enhancer.controller_for_templates_by_class" class="Symfony\Cmf\Component\Routing\Enhancer\FieldByClassEnhancer" public="false">
            <argument>_content</argument>
            <argument>_controller</argument>
            <argument type="collection" />
        </service>

        <service id="cmf_routing.enhancer.templates_by_class" class="Symfony\Cmf\Component\Routing\Enhancer\FieldByClassEnhancer" public="false">
            <argument>_content</argument>
            <argument>_template</argument>
            <argument>%cmf_routing.templates_by_class%</argument>
        </service>

        <service id="cmf_routing.enhancer.content_repository" class="Symfony\Cmf\Component\Routing\Enhancer\ContentRepositoryEnhancer" public="false">
            <argument type="service" id="cmf_routing.content_repository"/>
        </service>

        <service id="cmf_routing.dynamic_router" class="Symfony\Cmf\Bundle\RoutingBundle\Routing\DynamicRouter">
            <argument type="service" id="router.request_context"/>
            <argument type="service" id="cmf_routing.nested_matcher" />
            <argument/>
            <argument>%cmf_routing.uri_filter_regexp%</argument>
            <argument type="service" id="event_dispatcher" on-invalid="ignore"/>
            <argument type="service" id="cmf_routing.route_provider"/>
            <call method="setRequestStack"><argument type="service" id="request_stack"/></call>
        </service>

        <service id="cmf_routing.nested_matcher" class="Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher">
            <argument type="service" id="cmf_routing.route_provider" />
            <argument type="service" id="cmf_routing.final_matcher"/>
        </service>

        <service id="cmf_routing.matcher.dummy_collection" class="Symfony\Component\Routing\RouteCollection" public="false"/>

        <service id="cmf_routing.matcher.dummy_context" class="Symfony\Component\Routing\RequestContext" public="false"/>

        <service id="cmf_routing.final_matcher" class="Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher">
            <argument type="service" id="cmf_routing.matcher.dummy_collection"/>
            <argument type="service" id="cmf_routing.matcher.dummy_context"/>
        </service>

        <service id="cmf_routing.generator" class="Symfony\Cmf\Component\Routing\ContentAwareGenerator">
            <argument type="service" id="cmf_routing.route_provider" />
            <argument type="service" id="logger" on-invalid="ignore" />
        </service>

        <service id="cmf_routing.redirect_controller" class="Symfony\Cmf\Bundle\RoutingBundle\Controller\RedirectController" public="true">
            <argument type="service" id="router" />
        </service>

    </services>
</container>
