/** * Serliaisation sleep method. * * Do not include Foowd meta arrays or temp import variables when serialising the object.. * * @return array Array of the names of the member variables to keep when serialising. */ function __sleep() { $returnArray = parent::__sleep(); $c = 0; foreach ($returnArray as $i => $key) { switch ($key) { case 'level': case 'varName': case 'object': unset($returnArray[$i]); if ($c++ >= 2) { break; } default: continue; } } return array_values($returnArray); }
/** * Serliaisation sleep method. * This is a VERY simple class. * Only include the objectid and title fields. * * @access private * @return array Array of the names of the member variables to keep when serialising. */ function __sleep() { $returnArray = parent::__sleep(); foreach ($returnArray as $key => $value) { if ($value == 'permissions' || $value == 'version' || $value == 'classid') { unset($returnArray[$key]); } } return array_values($returnArray); }