-/*
- function idOf(Row $row, $check = false) {
- $identity = $row->getIdentity();
- if (is_scalar($identity)) {
- return $identity;
- }
-
- if ($check && !isset($identity)) {
- return false;
- }
-
- if (is_array($identity)) {
- if ($check && array_search(null, $identity, true)) {
- return false;
- }
- /* one level is better than no level * /
- asort($identity);
- }
- return json_encode($identity);
- }
-
- function objectOf(Row $row) {
- $id = $this->idOf($row);
-
- if (isset($this->objects["obj"][$id])) {
- $obj = $this->objects["obj"][$id];
- } else {
- $obj = new $this->class;
- $this->objects["obj"][$id] = $obj;
- $this->objects["row"][spl_object_hash($obj)] = $row;
- }
- return $obj;
- }