Sokil\Mongo\Structure::reset PHP Метод

reset() публичный Метод

Replace modified fields with original
public reset ( )
    public function reset()
    {
        $this->data = $this->originalData;
        $this->modifiedFields = array();
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * 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;
 }
All Usage Examples Of Sokil\Mongo\Structure::reset