public function clear()
{
$this->elements = array();
}
public function clearCollections() { $this->hookedObjectCollections->forAll(function ($key, HookedObjectCollectionEntity $hookedObjectCollectionEntity) { $hookedObjectCollectionEntity->getCollection()->getHookedObjectCollections()->removeElement($hookedObjectCollectionEntity); $hookedObjectCollectionEntity->setCollection(null)->setHookedObject(null); }); $this->hookedObjectCollections->clear(); }