Pārlūkot izejas kodu

Add a public getter for the Esi instance

Matthieu Bontemps 14 gadi atpakaļ
vecāks
revīzija
8e4686787a

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php

@@ -51,7 +51,7 @@ abstract class HttpCache extends BaseHttpCache
     {
         $this->getKernel()->boot();
         $this->getKernel()->getContainer()->set('cache', $this);
-        $this->getKernel()->getContainer()->set('esi', $this->esi);
+        $this->getKernel()->getContainer()->set('esi', $this->getEsi());
 
         return parent::forward($request, $raw, $entry);
     }

+ 11 - 0
src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

@@ -138,6 +138,17 @@ class HttpCache implements HttpKernelInterface
         return $this->kernel;
     }
 
+
+    /**
+     * Gets the Esi instance
+     *
+     * @return Symfony\Component\HttpKernel\HttpCache\Esi An Esi instance
+     */
+    public function getEsi()
+    {
+        return $this->esi;
+    }
+
     /**
      * {@inheritdoc}
      */