/** * 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); } $this->дата = null; $this->год = null; $this->полугодие = null; $this->квартал = 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); }