Restore the previous value
@return void
489917
public function restore()
    {
        if ($this->backup instanceof NotSet) {
            if (is_file($this->name)) {
                unlink($this->name);
            }
        } else {
            file_put_contents($this->name, $this->backup);
        }
    }
337536
public function reset()
    {
        $this->values[self::ID] = null;
        $this->values[self::ITERATION] = null;
        $this->values[self::CHAINKEY] = null;
        $this->values[self::SIGNINGKEY] = null;
    }
66965
protected function reset()
    {
        $this->valid = true;
        $this->fetchmore = true;
        $this->elements = array();
        $this->position = -1;
        $this->current = null;
    }
125580
public function prev(): void
    {
        if ($this->current instanceof TerminalBucket) {
            return;
        }

        $this->current = $this->current->prev();
        $this->offset--;
    }
689296
public function rewind()
    {
        $keys = array_keys($this->items);

        $this->currentKey = !empty($keys) ? reset($keys) : null;
    }
1029854
public function restore()
    {
        if ($this->hidden_at !== null) {
            $this->hidden_at = null;
            $this->hidden_user_id = null;

            $this->raise(new Restored($this));
        }

        return $this;
    }
101215
public function reissue()
    {
        if (!isset($this->data) && isset($this->session[$this->key])) {
            $this->data = $this->session[$this->key];
        } else {
            $this->session[$this->key] = $this->data;
        }
    }
1280942
protected function restore() {
        if (!$this->id) {
            return;
        }
        // Update all fields in the current object.
        $newrecord = self::get($this->id, MUST_EXIST, true);
        foreach (self::$coursecatfields as $key => $unused) {
            $this->$key = $newrecord->$key;
        }
    }
1331326
private function restoreBackup()
    {
        $hash       = $this->getHash();
        $connection = $this->entityManager->getConnection();

        $this->backupService->restoreBackup($connection, $hash);
    }
1246334
public function restore()
    {
        // If the restoring event does not return false, we will proceed with this
        // restore operation. Otherwise, we bail out so the developer will stop
        // the restore totally. We will clear the deleted timestamp and save.
        if ($this->fireModelEvent('restoring') === false) {
            return false;
        }

        $this->{$this->getDeletedAtColumn()} = null;

        // Once we have saved the model, we will fire the "restored" event so this
        // developer will do anything they need to after a restore operation is
        // totally finished. Then we will return the result of the save call.
        $this->exists = true;

        $result = $this->save();

        $this->fireModelEvent('restored', false);

        return $result;
    }
541411
public function resetOneTimeValues()
    {
        $this->prefix = null;

        $this->suffix = null;

        $this->fakerString = null;

        return $this;
    }
129428
public function reset()
    {
        $this->pos(0);
        $this->matchHistory = array(null, null);
        $this->ss = new StringSearch($this->src);
    }
347572
function restore($old, $new) {
        // We append the next element after this point. If $after is not yet set, we prepend to $new
        // and then set $after to the node just prepended.
        var $after;
        $new.contents().each(function() {
          var $node = $(this);
          var handled = false;
          var $nodeOld;
          if (is($node, 'preserve')) {
            $nodeOld = findVal($old, 'preserve', attr($node, 'preserve'));
            $after = $nodeOld;
            handled = true;
          } else if (is($node, 'preserves')) {
            $nodeOld = findVal($old, 'preserves', attr($node, 'preserves'));
            if ($nodeOld.length) {
              restore($nodeOld, $node);
              $after = $nodeOld;
              handled = true;
            }
          }
          if (!handled) {
            if ($after) {
              $after.after($node);
            } else {
              $old.prepend($node);
            }
            $after = $node;
          }
        });
      }
1211429
protected function restoreMessage()
    {
        $this->setBody($this->savedMessage['body']);
        $this->setChildren($this->savedMessage['children']);

        $this->restoreHeaders();
        $this->savedMessage = [];
    }
577855
public void
restore() {
	if (saved_pos < 0) {
		throw new IllegalStateException("no previous state");
	}
	byteBuffer.position(saved_pos);
	byteBuffer.limit(saved_end);
	saved_pos = -1;
	saved_end = -1;
}
94419
public function restore()
	{
		if ($this->model->isSoftDeleting())
		{
			$column = $this->model->getDeletedAtColumn();

			return $this->update(array($column => null));
		}
	}
470167
public function after_restore() {
        global $DB;

        // Get the blockid.
        $blockid = $this->get_blockid();

        if ($configdata = $DB->get_field('block_instances', 'configdata', array('id' => $blockid))) {
            $config = unserialize(base64_decode($configdata));
            if (!empty($config->activityparentid)) {
                // Get the mapping and replace it in config.
                if ($mapping = restore_dbops::get_backup_ids_record($this->get_restoreid(),
                    $config->activityparent, $config->activityparentid)) {

                    // Update the parent module id (the id from mdl_quiz etc...)
                    $config->activityparentid = $mapping->newitemid;

                    // Get the grade_items record to update the activitygradeitemid.
                    $info = $DB->get_record('grade_items',
                            array('iteminstance' => $config->activityparentid, 'itemmodule' => $config->activityparent));

                    // Update the activitygradeitemid the id from the grade_items table.
                    $config->activitygradeitemid = $info->id;

                    // Encode and save the config.
                    $configdata = base64_encode(serialize($config));
                    $DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));
                }
            }
        }
    }