示例#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->aDivisionRef) {
         $this->aDivisionRef->removeTeams($this);
     }
     if (null !== $this->aLeagueRef) {
         $this->aLeagueRef->removeTeams($this);
     }
     $this->id = null;
     $this->link = null;
     $this->owner = null;
     $this->name = null;
     $this->nickname = null;
     $this->team_abbrev = null;
     $this->division = null;
     $this->email = null;
     $this->status = null;
     $this->comment = null;
     $this->league = null;
     $this->used = null;
     $this->email2 = null;
     $this->address = null;
     $this->city = null;
     $this->state = null;
     $this->zip = null;
     $this->phone = null;
     $this->team_link = null;
     $this->trade_link = null;
     $this->draft_link = null;
     $this->awards_link = null;
     $this->aim = null;
     $this->yahoo = null;
     $this->create_ts = null;
     $this->maint_ts = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }