/**
* @param object $object
* @throws IllegalObjectTypeException
*/
public function add($object)
{
$this->persistenceManager->whitelistObject($object);
if ($this->removedResources->contains($object)) {
$this->removedResources->detach($object);
}
if (!$this->addedResources->contains($object)) {
$this->addedResources->attach($object);
parent::add($object);
}
}