Beispiel #1
0
 /**
  * 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->aChampionship) {
         $this->aChampionship->removeMatch($this);
     }
     if (null !== $this->aRound) {
         $this->aRound->removeMatch($this);
     }
     if (null !== $this->aLeague) {
         $this->aLeague->removeMatch($this);
     }
     if (null !== $this->aHometeam) {
         $this->aHometeam->removeMatchRelatedByHometeamId($this);
     }
     if (null !== $this->aAwayteam) {
         $this->aAwayteam->removeMatchRelatedByAwayteamId($this);
     }
     $this->id = null;
     $this->nr = null;
     $this->date = null;
     $this->result = null;
     $this->toto = null;
     $this->championship_id = null;
     $this->round_id = null;
     $this->league_id = null;
     $this->hometeam_id = null;
     $this->awayteam_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }