/** * Reset all data passed to object in run-time, like events, behaviors, * data modifications, etc. to the state just after open or save document * * @return \Sokil\Mongo\Document */ public function reset() { // reset structure parent::reset(); // reset errors $this->errors = array(); $this->triggeredErrors = array(); // reset behaviors $this->clearBehaviors(); // init delegates $this->initDocument(); return $this; }
/** * Reset all data passed to object in run-time, like events, behaviors, * data modifications, etc. to the state just after open or save document * * @return \Sokil\Mongo\Document */ public function reset() { // reset structure parent::reset(); // reset errors $this->clearErrors(); // reset behaviors $this->clearBehaviors(); // init delegates $this->initDelegates(); return $this; }