+ /**
+ * Fill modified cells
+ * @return \pq\Gateway\Row
+ */
+ protected function prime() {
+ $this->mods = array();
+ foreach ($this->data as $key => $val) {
+ $this->mods[$key] = new Cell($this, $key, $val);
+ }
+ return $this;
+ }
+
+ /**
+ * Transform data array to where criteria
+ * @param array $data
+ * @return array
+ */
+ protected function criteria() {
+ $where = array();
+ array_walk($this->data, function($v, $k) use (&$where) {
+ $where["$k="] = $v;
+ });
+ return $where;
+ }
+
+ protected function changes() {
+ $changes = array();
+ foreach ($this->mods as $name => $cell) {
+ $changes[$name] = $cell->get();
+ }
+ return $changes;
+ }
+
+ /**
+ * Get a cell
+ * @param string $p
+ * @return \pq\Gateway\Cell
+ */