Explorar o código

[Foundation] added Kernel::__clone()

Fabien Potencier %!s(int64=15) %!d(string=hai) anos
pai
achega
e3c2e40c06
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      src/Symfony/Foundation/Kernel.php

+ 11 - 0
src/Symfony/Foundation/Kernel.php

@@ -66,6 +66,17 @@ abstract class Kernel implements HttpKernelInterface, \Serializable
         }
     }
 
+    public function __clone()
+    {
+        if ($this->debug) {
+            $this->startTime = microtime(true);
+        }
+
+        $this->booted = false;
+        $this->container = null;
+        $this->request = null;
+    }
+
     abstract public function registerRootDir();
 
     abstract public function registerBundles();