private static function readName($type, $o) { $stdType = MergeForm::getStdType($type); $given = (string) $o['given']; $stdGiven = mb_convert_case($given, MB_CASE_LOWER); $givenSdx = MergeForm::getSoundexString($stdGiven); $surname = (string) $o['surname']; $stdSurname = mb_convert_case($surname, MB_CASE_LOWER); $surnameSdx = MergeForm::getSoundexString($stdSurname); $titlePrefix = (string) $o['title_prefix']; $stdTitlePrefix = mb_convert_case($titlePrefix, MB_CASE_LOWER); $titleSuffix = (string) $o['title_suffix']; $stdTitleSuffix = mb_convert_case($titleSuffix, MB_CASE_LOWER); $sources = (string) $o['sources']; $notes = (string) $o['notes']; $key = 'NAME|' . $type . '|' . $given . '|' . $surname . '|' . $titlePrefix . '|' . $titleSuffix . '|' . $sources . '|' . $notes; return array('type' => $type, 'stdtype' => $stdType, 'given' => $given, 'stdgiven' => $stdGiven, 'stdgivensdx' => $givenSdx, 'surname' => $surname, 'stdsurname' => $stdSurname, 'stdsurnamesdx' => $surnameSdx, 'title_prefix' => $titlePrefix, 'stdtitle_prefix' => $stdTitlePrefix, 'title_suffix' => $titleSuffix, 'stdtitle_suffix' => $stdTitleSuffix, 'sources' => $sources, 'notes' => $notes, 'key' => $key); }