services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false

    session.attribute_bag:
        # default class is Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag
        class: Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag
        public: false

    Zikula\Bundle\CoreBundle\HttpFoundation\Session\:
        resource: '../../HttpFoundation/Session/*'

    Zikula\Bundle\CoreBundle\HttpFoundation\Session\DoctrineSessionHandler:
        arguments:
            $installed: '%env(ZIKULA_INSTALLED)%'
        calls:
            - setStorage: ['@zikula_core.bridge.http_foundation.zikula_session_storage_doctrine']

    zikula_core.bridge.http_foundation.doctrine_session_handler:
        alias: Zikula\Bundle\CoreBundle\HttpFoundation\Session\DoctrineSessionHandler

    zikula_core.bridge.http_foundation.zikula_session_storage_doctrine:
        class: Zikula\Bundle\CoreBundle\HttpFoundation\Session\ZikulaSessionStorage
        arguments:
          $options: '%session.storage.options%'
        calls:
            - setSaveHandler: ['@Zikula\Bundle\CoreBundle\HttpFoundation\Session\DoctrineSessionHandler']

    zikula_core.bridge.http_foundation.zikula_session_storage_file:
        class: Zikula\Bundle\CoreBundle\HttpFoundation\Session\ZikulaSessionStorage
        arguments:
          $options: '%session.storage.options%'
        calls:
            - setSaveHandler: ['@session.handler.native_file']
