return $changes;
}
+ /**
+ * Cell accessor
+ * @param string $p column name
+ * @return \pq\Gateway\Cell
+ */
+ protected function cell($p) {
+ if (!isset($this->cell[$p])) {
+ $this->cell[$p] = new Cell($this, $p, isset($this->data[$p]) ? $this->data[$p] : null);
+ }
+ return $this->cell[$p];
+ }
+
/**
* Get a cell or parent rows
* @param string $p
if ($this->table->hasRelation($p)) {
return $this->table->by($this, $p);
}
- if (!isset($this->cell[$p])) {
- $this->cell[$p] = new Cell($this, $p, isset($this->data[$p]) ? $this->data[$p] : null);
- }
- return $this->cell[$p];
+ return $this->cell($p);
}
/**
* @param mixed $v
*/
function __set($p, $v) {
- $this->__get($p)->set($v);
+ $this->cell($p)->set($v);
}
/**