summaryrefslogtreecommitdiff
path: root/framework/TComponent.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/TComponent.php')
-rw-r--r--framework/TComponent.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/framework/TComponent.php b/framework/TComponent.php
index ea204011..dbcf4a60 100644
--- a/framework/TComponent.php
+++ b/framework/TComponent.php
@@ -451,6 +451,31 @@ class TComponent
public function addParsedObject($object)
{
}
+
+ /**
+ * Do not call this method. This is a PHP magic method that will be called automatically
+ * after any unserialization; it can perform reinitialization tasks on the object.
+ */
+ public function __wakeup()
+ {
+ if ($this->_e===null)
+ $this->_e = array();
+ }
+
+ /**
+ * Returns an array with the names of all variables of that object that should be serialized.
+ * Do not call this method. This is a PHP magic method that will be called automatically
+ * prior to any serialization.
+ */
+ public function __sleep()
+ {
+ $a = (array)$this;
+ $a = array_keys($a);
+ $exprops = array();
+ if ($this->_e===array())
+ $exprops[] = "\0TComponent\0_e";
+ return array_diff($a,$exprops);
+ }
}
/**