From e4aaebe25af5143c4815a538ee7a89426e2bd55c Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 25 Jun 2009 17:57:43 -0600 Subject: [PATCH] No need to store utils object when serializing --- .../Imap_Client/lib/Horde/Imap/Client/Search/Query.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php b/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php index b798da4a7..39fff05d5 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php @@ -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(); } -- 2.11.0