Reload a fresh model instance from the directory.

@return static|null
175002
public function fresh()
    {
        $model = $this->query->newInstance()->findByDn($this->getDn());

        return $model instanceof Model ? $model : null;
    }
134181
public function refresh() {

		clearstatcache();

		$file = new File($this -> file -> getBasepath());
		$this -> file = $file -> entity();

		return $this;
	}
698286
public function reset() : self
    {
        $this->version = null;
        $this->resource = null;
        $this->id = null;
        $this->secure = false;
        $this->relationship = null;
        $this->relatedId = null;

        return $this;
    }
1243265
public function Refresh() {
      $LocalName = $this->Current();
      
      $ApplicationWhiteList = Gdn::ApplicationManager()->EnabledApplicationFolders();
      $PluginWhiteList = Gdn::PluginManager()->EnabledPluginFolders();

      $ForceRemapping = TRUE;

      $this->Set($LocalName, $ApplicationWhiteList, $PluginWhiteList, $ForceRemapping);
   }
1273488
public function reset()
    {
        $this->_set_query = null;
        $this->_loaded = false;
        $this->_object_set = new ArrayObject();

        return $this;
    }
594475
public function reset()
    {
        foreach (array_keys($this->_loaded) as $name) {
            $this->unload($name);
        }

        return $this;
    }
571947
public function reload()
    {
      $this->__pending = array();

      if ($this->__filter !== null) {
        $tmp = new static($this->__filter);
        $this->__data = $tmp->__data;
      }
    }
272826
public function refresh()
    {
        $app = Facade::getFacadeApplication();
        $db = $app->make('database')->connection();
        $pkgHandle = false;
        if ($this->pkgID > 0) {
            $pkgHandle = $this->getPackageHandle();
        }

        $class = \Concrete\Core\Block\BlockType\BlockType::getBlockTypeMappedClass($this->btHandle, $pkgHandle);
        $bta = $app->build($class);

        $this->loadFromController($bta);

        $em = \ORM::entityManager();
        $em->persist($this);
        $em->flush();

        $env = Environment::get();
        $r = $env->getRecord(DIRNAME_BLOCKS . '/' . $this->btHandle . '/' . FILENAME_BLOCK_DB, $this->getPackageHandle());
        if ($r->exists()) {
            $parser = Schema::getSchemaParser(simplexml_load_file($r->file));
            $parser->setIgnoreExistingTables(false);
            $toSchema = $parser->parse($db);

            $fromSchema = $db->getSchemaManager()->createSchema();
            $comparator = new \Doctrine\DBAL\Schema\Comparator();
            $schemaDiff = $comparator->compare($fromSchema, $toSchema);
            $saveQueries = $schemaDiff->toSaveSql($db->getDatabasePlatform());
            foreach ($saveQueries as $query) {
                $db->query($query);
            }
        }
    }
231103
public function reload(): void
    {
        $config = [];
        foreach($this->configSources as $src) {
            // If it's a string, then it's a file or directory path
            if (is_string($src)) {
                // If directory, get all config files within it, recursively
                if (is_dir($src)) {
                    $getConfigFiles = function(string $path) use (&$getConfigFiles) {
                        $fragments = [];
                        if (is_dir($path)) {
                            $d = dir($path);
                            while (($f = $d->read()) !== false) {
                                if ($f[0] === '.') {
                                    continue;
                                }
                                if (is_dir("$path/$f")) {
                                    $fragments = array_merge($fragments, $getConfigFiles("$path/$f"));
                                } else {
                                    $fragments[] = "$path/$f";
                                }
                            }
                        }
                        return $fragments;
                    };
                    $fragments = $getConfigFiles($src);
                    sort($fragments);
                    foreach($fragments as $c) {
                        $config = array_replace_recursive($config, $this->parseConfig(file_get_contents($c)));
                    }

                // If it's a file, just merge it's contents over the current config array
                } elseif (is_file($src)) {
                    $config = array_replace_recursive($config, $this->parseConfig(file_get_contents($src)));

                // If it doesn't exist in the filesystem, and it's not optional, throw an exception
                } elseif (array_search($src, $this->optional) === false) {
                    throw (new MissingConfigFileException("Required config file or directory `$src` is missing."))
                        ->setMissingPath($src);
                }

            // If the source is an array, just merge it in
            } elseif (is_array($src)) {
                $config = array_replace_recursive($config, $src);
            }
        }
        $this->config = $config;
    }
292981
private function reload()
    {
        $this->persistenceStorage->setWURFLLoaded(false);
        $this->invalidateCache();
        $this->init();
        $this->persistenceStorage->save(self::WURFL_API_STATE, $this->getState());
    }
106235
public function getModel($reload = false)
    {
        if (!isset($this->model) || $reload) {
            $class = static::$modelClass;
            $this->model = $class::findOrFail($this->getId());
        }

        return $this->model;
    }
683999
public function refresh()
    {
        $url = self::classUrl() . "?id=" . $this->instanceId();
        list($resp, $usedOpts) = self::request(self::METHOD_GET, $url);
        $body = isset($resp['data'][0]) ? $resp['data'][0] : null;
        $this->install($body, $usedOpts);
        return $this;
    }
105825
public static function reload()
    {
        if (empty(static::$_initialState)) {
            static::$_collection = new RouteCollection();
            static::$_initialState = get_class_vars(get_called_class());

            return;
        }
        foreach (static::$_initialState as $key => $val) {
            if ($key !== '_initialState') {
                static::${$key} = $val;
            }
        }
        static::$_collection = new RouteCollection();
    }
1197515
public function reload(): bool
	{
		if($this->isPersisted)
		{
			$model = static::get($this->getPrimaryKeyValue());

			if($model !== false)
			{
				$this->original = $this->columns = $model->getRawColumnValues();

				$this->related = $model->getRelated();

				return true;
			}
		}

		return false;
	}
1171634
public function reload()
    {
        $this->propertyCache = [];

        $repository = $this->getRepository();
        $repository->reHydrateObject($this, $this->uniqueIdentifier);
    }
1030254
def refresh_model(self, model, *, overwrite=False):
    
    new_model = self.find_model_by_id(model.__class__, model.primary_key)
    if overwrite:
      model.update(new_model.to_dict(use_default_excludes=False))
      return model
    else:
      return new_model
414814
public function actionRefresh()
    {
        $model = new AdminRoute();
        $model->invalidate();
        Yii::$app->getResponse()->format = Response::FORMAT_JSON;
        return $model->getRoutes();
    }