Example #1
0
 public final function dataRefresh()
 {
     list($data) = Model::factoryData(['id' => $this->id], $this->table, $this->database);
     // Database data object unique to this object
     $this->_data = new Data($data, $this->table, Schema::get($this->database));
     Data::updateCache($this->_data);
     // Call replacement constructor after storing in the cache list (to prevent recursion)
     $this->dataClearCache();
     $this->_init();
     return $this;
 }