Esempio n. 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->aPeriod) {
         $this->aPeriod->removeApplication($this);
     }
     if (null !== $this->aSubject) {
         $this->aSubject->removeApplication($this);
     }
     if (null !== $this->aStudent) {
         $this->aStudent->removeApplication($this);
     }
     if (null !== $this->aSchoolYear) {
         $this->aSchoolYear->removeApplication($this);
     }
     $this->id = null;
     $this->student_id = null;
     $this->subject_id = null;
     $this->period_id = null;
     $this->school_year_id = null;
     $this->application_date = null;
     $this->exam_date = null;
     $this->exam_time = null;
     $this->exam_score = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }