Commit 98894c0e authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1197 Implement StripData() for HierarchyCache + MemoryChangesWrapper.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 19cc91c5
......@@ -403,4 +403,19 @@ class ChangesMemoryWrapper extends HierarchyCache implements IImportChanges, IEx
$this->changes = array();
$this->step = 0;
}
/**
* Removes internal data from the object, so this data can not be exposed.
*
* @access public
* @return boolean
*/
public function StripData() {
unset($this->changes);
unset($this->step);
unset($this->destinationImporter);
unset($this->exportImporter);
return parent::StripData();
}
}
......@@ -181,6 +181,21 @@ class HierarchyCache {
return sprintf("HierarchyCache is %s - Cached objects: %d", ((isset($this->cacheById))?"up":"down"), ((isset($this->cacheById))?count($this->cacheById):"0"));
}
/**
* Removes internal data from the object, so this data can not be exposed.
*
* @access public
* @return boolean
*/
public function StripData() {
unset($this->changed);
unset($this->cacheByIdOld);
foreach ($this->cacheById as $id => $folder) {
$folder->StripData();
}
return true;
}
/**
* Returns objects which should be persistent
* called before serialization
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment