Exemple #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->aParent) {
         $this->aParent->removeSublanguage($this);
     }
     if (null !== $this->aScope) {
         $this->aScope->removeLanguage($this);
     }
     if (null !== $this->aType) {
         $this->aType->removeLanguage($this);
     }
     if (null !== $this->aScript) {
         $this->aScript->removeLanguage($this);
     }
     if (null !== $this->aFamily) {
         $this->aFamily->removeLanguage($this);
     }
     $this->id = null;
     $this->alpha_2 = null;
     $this->alpha_3t = null;
     $this->alpha_3b = null;
     $this->alpha_3 = null;
     $this->parent_id = null;
     $this->macrolanguage_status = null;
     $this->name = null;
     $this->native_name = null;
     $this->collate = null;
     $this->subtag = null;
     $this->prefix = null;
     $this->scope_id = null;
     $this->type_id = null;
     $this->family_id = null;
     $this->default_script_id = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }