public function removeAll() { foreach ($this->_associated_objects as $parent_property => $object) { /** * @var Object $object */ $object->setDirty($parent_property); } $this->exchangeArray([]); }