コード例 #1
0
ファイル: Tip.php プロジェクト: haus23/dtp.model
 /**
  * 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->aPlayer) {
         $this->aPlayer->removeTip($this);
     }
     if (null !== $this->aMatch) {
         $this->aMatch->removeTip($this);
     }
     $this->id = null;
     $this->bet = null;
     $this->toto = null;
     $this->joker = null;
     $this->extra_joker = null;
     $this->points = null;
     $this->match_id = null;
     $this->player_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }