public function reset() { // reset structure parent::reset(); // reset errors $this->clearErrors(); // reset behaviors $this->clearBehaviors(); // init delegates $this->initDelegates(); return $this; }
public function insert(array $document) { if (!$this->isValidationEnabled) { self::$validator->merge($document); $isValid = self::$validator->isValid(); self::$validator->reset(); if (!$isValid) { throw new InvalidDocumentException('Document is invalid on batch insert'); } } $this->add($document); return $this; }