<?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="session.class">Symfony\Component\HttpFoundation\Session</parameter>
        <parameter key="session.storage.native.class">Symfony\Component\HttpFoundation\SessionStorage\NativeSessionStorage</parameter>
        <parameter key="session.storage.filesystem.class">Symfony\Component\HttpFoundation\SessionStorage\FilesystemSessionStorage</parameter>
        <parameter key="session_listener.class">Symfony\Bundle\FrameworkBundle\EventListener\SessionListener</parameter>
    </parameters>

    <services>
        <service id="session" class="%session.class%">
            <argument type="service" id="session.storage" />
            <argument>%session.default_locale%</argument>
        </service>

        <service id="session.storage.native" class="%session.storage.native.class%" public="false">
            <argument>%session.storage.options%</argument>
        </service>

        <service id="session.storage.filesystem" class="%session.storage.filesystem.class%" public="false">
            <argument>%kernel.cache_dir%/sessions</argument>
            <argument>%session.storage.options%</argument>
        </service>

        <service id="session_listener" class="%session_listener.class%">
            <tag name="kernel.event_listener" event="kernel.request" method="onKernelRequest" priority="128" />
            <argument type="service" id="service_container" />
        </service>
    </services>
</container>
