/** * 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->aContinent) { $this->aContinent->removeCountry($this); } if (null !== $this->aCurrency) { $this->aCurrency->removeCountry($this); } if (null !== $this->aType) { $this->aType->removeCountryRelatedByTypeId($this); } if (null !== $this->aSubtype) { $this->aSubtype->removeCountryRelatedBySubtypeId($this); } if (null !== $this->aCountryRelatedBySovereignityId) { $this->aCountryRelatedBySovereignityId->removeSubordinate($this); } $this->id = null; $this->numeric = null; $this->alpha_2 = null; $this->alpha_3 = null; $this->short_name = null; $this->ioc = null; $this->tld = null; $this->phone = null; $this->capital = null; $this->postal_code_format = null; $this->postal_code_regex = null; $this->continent_id = null; $this->currency_id = null; $this->type_id = null; $this->subtype_id = null; $this->sovereignity_id = null; $this->formal_name = null; $this->formal_native_name = null; $this->short_native_name = null; $this->bbox_sw_lat = null; $this->bbox_sw_lng = null; $this->bbox_ne_lat = null; $this->bbox_ne_lng = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }