private function getRecords($table, $field = null, $value = null) { $data = array(); $sql = $this->assembleQuery($table, $field); $statement = \Dba::read($sql, is_array($value) ? $value : array($value)); while ($object = \Dba::fetch_object($statement, $this->modelClassName)) { $data[$object->getId()] = $object; } return $data; }