소스 검색

[FrameworkBundle] Added options auto-start and auto_start to the session configuration to allow session to be autostarted.

Henrik Bjørnskov 14 년 전
부모
커밋
91c5c910eb
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+ 4 - 0
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

@@ -315,6 +315,10 @@ class FrameworkExtension extends Extension
             }
         }
 
+        if (isset($config['auto_start']) || isset($config['auto-start'])) {
+            $container->getDefinition('session')->addMethodCall('start');
+        }
+
         if (isset($config['class'])) {
             $container->setParameter('session.class', $config['class']);
         }