*/
function __construct(Table $table, array $data = null, $prime = false) {
$this->table = $table;
- $this->data = $data;
+ $this->data = (array) $data;
if ($prime) {
$this->prime();
return false;
}
+ function refresh() {
+ $this->data = $this->table->find($this->criteria(), null, 1, 0)->current()->data;
+ $this->cell = array();
+ return $this;
+ }
+
/**
* Fill modified cells
* @return \pq\Gateway\Row