/** * 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->aКалендарь) { $this->aКалендарь->removeмтр($this); } if (null !== $this->aподрядчикимтр) { $this->aподрядчикимтр->removeмтр($this); } if (null !== $this->aПроекты) { $this->aПроекты->removeмтр($this); } if (null !== $this->aстатуссостояниятехники) { $this->aстатуссостояниятехники->removeмтр($this); } if (null !== $this->aтипытехникимтр) { $this->aтипытехникимтр->removeмтр($this); } $this->id = null; $this->vin = null; $this->тип_техники = null; $this->дата = null; $this->состояние_техники = null; $this->подрядчик = null; $this->проект = null; $this->дата_отчёта = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }