/** * 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')); }