public function load(Database $db, $id = null) { if (is_numeric($this->id) || is_numeric($id)) { $x = new Record($db, $this->_dbTable, $this->_dbSeq, $this->_dbPkey); $x->booleanFields = $this->booleanFields; if (!is_null($id) && is_numeric($id)) { $this->id = $id; } $x->id = $this->id; $this->_data = $x->load(); } else { throw new ErrorException(__METHOD__ . ": required ID not set (" . $this->id . "[type=(" . gettype($this->id) . ")])... "); } return $this->_data; }