Sfoglia il codice sorgente

changed injection type

Johannes Schmitt 14 anni fa
parent
commit
786823151e

+ 7 - 0
src/Symfony/Bundle/FrameworkBundle/Listener/SessionInitializingListener.php

@@ -11,6 +11,8 @@
 
 namespace Symfony\Bundle\FrameworkBundle\Listener;
 
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
 
@@ -26,6 +28,11 @@ class SessionInitializingListener
 {
     private $container;
 
+    public function __construct(ContainerInterface $container)
+    {
+        $this->container = $container;
+    }
+
     public function onCoreRequest(GetResponseEvent $event)
     {
         if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml

@@ -38,7 +38,7 @@
         
         <service id="session_initializing_listener" class="%session_initializing_listener.class%">
             <tag name="kernel.listener" event="onCoreRequest" priority="255" />
-            <property name="container" type="service" id="service_container" />
+            <argument type="service" id="service_container" />
         </service>
 
         <service id="response_listener" class="%response_listener.class%">