/** * Finds all the user details associated with a user * @param int $id The user_id of the user who's details should be retrieved * @return Default_Model_UserDetail[] Array of user details */ public function findAllById($id) { $resultSet = $this->getDbTable()->fetchAll($this->getDbTable()->select()->where('user_id = ?', $id)); $entries = array(); foreach ($resultSet as $row) { $entry = new Default_Model_UserDetail(); $entry->setId($row->user_id); $entry->setKey($row->key); $entry->setValue($row->value); $entry->setMapper($this); $entries[] = $entry; } return $entries; }