/** * 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->aInstance) { $this->aInstance->removeSubscription($this); } if (null !== $this->aInput) { $this->aInput->removeSubscription($this); } if (null !== $this->aUser) { $this->aUser->removeSubscription($this); } if (null !== $this->aChannel) { $this->aChannel->removeSubscription($this); } $this->id = null; $this->instance_name = null; $this->input_uuid = null; $this->user_id = null; $this->channel_id = null; $this->subscription_id = null; $this->started = null; $this->stopped = null; $this->title = null; $this->service = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }