No need to store utils object when serializing
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 25 Jun 2009 23:57:43 +0000 (17:57 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 07:46:08 +0000 (01:46 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php

index b798da4..39fff05 100644 (file)
@@ -77,6 +77,22 @@ class Horde_Imap_Client_Search_Query
      */
     public function __construct()
     {
+        $this->__wakeup();
+    }
+
+    /**
+     * Tasks to perform on a serialize().
+     */
+    public function __sleep()
+    {
+        return array_diff(array_keys(get_class_vars(__CLASS__)), array('_utils'));
+    }
+
+    /**
+     * Tasks to perform on an unserialize().
+     */
+    public function __wakeup()
+    {
         $this->_utils = new Horde_Imap_Client_Utils();
     }