Преглед на файлове

Add a public getter for the Esi instance

Matthieu Bontemps преди 14 години
родител
ревизия
8e4686787a
променени са 2 файла, в които са добавени 12 реда и са изтрити 1 реда
  1. 1 1
      src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
  2. 11 0
      src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

+ 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}
      */