浏览代码

[Foundation] added Kernel::__clone()

Fabien Potencier 15 年之前
父节点
当前提交
e3c2e40c06
共有 1 个文件被更改,包括 11 次插入0 次删除
  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();