<?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="data_collector.config.class">Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector</parameter>
        <parameter key="data_collector.request.class">Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector</parameter>
        <parameter key="data_collector.exception.class">Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector</parameter>
        <parameter key="data_collector.events.class">Symfony\Component\HttpKernel\DataCollector\EventDataCollector</parameter>
        <parameter key="data_collector.logger.class">Symfony\Component\HttpKernel\DataCollector\LoggerDataCollector</parameter>
        <parameter key="data_collector.timer.class">Symfony\Bundle\FrameworkBundle\DataCollector\TimerDataCollector</parameter>
        <parameter key="data_collector.memory.class">Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector</parameter>
    </parameters>

    <services>
        <service id="data_collector.config" class="%data_collector.config.class%" public="false">
            <tag name="data_collector" template="WebProfilerBundle:Collector:config" id="config" priority="255" />
            <argument type="service" id="kernel" />
        </service>

        <service id="data_collector.request" class="%data_collector.request.class%">
            <tag name="kernel.event_listener" event="kernel.controller" method="onKernelController"/>
            <tag name="data_collector" template="WebProfilerBundle:Collector:request" id="request" priority="255" />
        </service>

        <service id="data_collector.exception" class="%data_collector.exception.class%" public="false">
            <tag name="data_collector" template="WebProfilerBundle:Collector:exception" id="exception" priority="255" />
        </service>

        <service id="data_collector.events" class="%data_collector.events.class%" public="false">
            <tag name="data_collector" template="WebProfilerBundle:Collector:events" id="events" priority="255" />
            <call method="setEventDispatcher">
                <argument type="service" id="event_dispatcher" />
            </call>
        </service>

        <service id="data_collector.logger" class="%data_collector.logger.class%" public="false">
            <tag name="data_collector" template="WebProfilerBundle:Collector:logger" id="logger" priority="255" />
            <tag name="monolog.logger" channel="profiler" />
            <argument type="service" id="logger" on-invalid="ignore" />
        </service>

        <service id="data_collector.timer" class="%data_collector.timer.class%" public="false">
            <tag name="data_collector" template="WebProfilerBundle:Collector:timer" id="timer" priority="255" />
            <argument type="service" id="kernel" />
        </service>

        <service id="data_collector.memory" class="%data_collector.memory.class%" public="false">
            <tag name="data_collector" template="WebProfilerBundle:Collector:memory" id="memory" priority="255" />
        </service>
    </services>
</container>
