/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->aWineRelatedByVote1) { $this->aWineRelatedByVote1->removeUserRelatedByVote1($this); } if (null !== $this->aWineRelatedByVote2) { $this->aWineRelatedByVote2->removeUserRelatedByVote2($this); } if (null !== $this->aWineRelatedByVote3) { $this->aWineRelatedByVote3->removeUserRelatedByVote3($this); } $this->iduser = null; $this->name = null; $this->vote1 = null; $this->vote2 = null; $this->vote3 = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }