|
@@ -25,7 +25,7 @@ use Symfony\Components\RequestHandler\RequestInterface;
|
|
|
* @package Symfony
|
|
|
* @author Fabien Potencier <fabien.potencier@symfony-project.org>
|
|
|
*/
|
|
|
-abstract class Kernel
|
|
|
+abstract class Kernel implements \Serializable
|
|
|
{
|
|
|
protected $bundles;
|
|
|
protected $bundleDirs;
|
|
@@ -380,4 +380,16 @@ abstract class Kernel
|
|
|
@rename($tmpFile, $file);
|
|
|
chmod($file, 0644);
|
|
|
}
|
|
|
+
|
|
|
+ public function serialize()
|
|
|
+ {
|
|
|
+ return serialize(array($this->environment, $this->debug));
|
|
|
+ }
|
|
|
+
|
|
|
+ public function unserialize($data)
|
|
|
+ {
|
|
|
+ list($environment, $debug) = unserialize($data);
|
|
|
+
|
|
|
+ $this->__construct($environment, $debug);
|
|
|
+ }
|
|
|
}
|