/** * magic method for serialize() * * with this method you can cache the mbox class * * @return array name of variables */ public function __sleep() { return array_merge(parent::__sleep(), array('_currentFolder', '_rootFolder', '_rootdir')); }