session.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" ?>
  2. <container xmlns="http://symfony.com/schema/dic/services"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  5. <parameters>
  6. <parameter key="session.class">Symfony\Component\HttpFoundation\Session\Session</parameter>
  7. <parameter key="session.flashbag.class">Symfony\Component\HttpFoundation\Session\Flash\FlashBag</parameter>
  8. <parameter key="session.attribute_bag.class">Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag</parameter>
  9. <parameter key="session.storage.metadata_bag.class">Symfony\Component\HttpFoundation\Session\Storage\MetadataBag</parameter>
  10. <parameter key="session.metadata.storage_key">_sf2_meta</parameter>
  11. <parameter key="session.storage.native.class">Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage</parameter>
  12. <parameter key="session.storage.php_bridge.class">Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage</parameter>
  13. <parameter key="session.storage.mock_file.class">Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage</parameter>
  14. <parameter key="session.handler.native_file.class">Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler</parameter>
  15. <parameter key="session.handler.write_check.class">Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler</parameter>
  16. <parameter key="session_listener.class">Symfony\Bundle\FrameworkBundle\EventListener\SessionListener</parameter>
  17. </parameters>
  18. <services>
  19. <service id="session" class="%session.class%">
  20. <argument type="service" id="session.storage" />
  21. <argument type="service" id="session.attribute_bag" />
  22. <argument type="service" id="session.flash_bag" />
  23. </service>
  24. <service id="session.storage.metadata_bag" class="%session.storage.metadata_bag.class%" public="false">
  25. <argument>%session.metadata.storage_key%</argument>
  26. <argument>%session.metadata.update_threshold%</argument>
  27. </service>
  28. <service id="session.storage.native" class="%session.storage.native.class%">
  29. <argument>%session.storage.options%</argument>
  30. <argument type="service" id="session.handler" />
  31. <argument type="service" id="session.storage.metadata_bag" />
  32. </service>
  33. <service id="session.storage.php_bridge" class="%session.storage.php_bridge.class%">
  34. <argument type="service" id="session.handler" />
  35. <argument type="service" id="session.storage.metadata_bag" />
  36. </service>
  37. <service id="session.flash_bag" class="%session.flashbag.class%" public="false" />
  38. <service id="session.attribute_bag" class="%session.attribute_bag.class%" public="false" />
  39. <service id="session.storage.mock_file" class="%session.storage.mock_file.class%" public="false">
  40. <argument>%kernel.cache_dir%/sessions</argument>
  41. <argument>MOCKSESSID</argument>
  42. <argument type="service" id="session.storage.metadata_bag" />
  43. </service>
  44. <service id="session.handler.native_file" class="%session.handler.native_file.class%" public="false">
  45. <argument>%session.save_path%</argument>
  46. </service>
  47. <service id="session.handler.write_check" class="%session.handler.write_check.class%" public="false" />
  48. <service id="session_listener" class="%session_listener.class%">
  49. <tag name="kernel.event_subscriber" />
  50. <argument type="service" id="service_container" />
  51. </service>
  52. <service id="session.save_listener" class="Symfony\Component\HttpKernel\EventListener\SaveSessionListener">
  53. <tag name="kernel.event_subscriber" />
  54. </service>
  55. <!-- for BC -->
  56. <service id="session.storage.filesystem" alias="session.storage.mock_file" />
  57. </services>
  58. </container>