/** * _refresh_registration_answers * * @param EE_Registration $registration * @return void */ protected function _refresh_registration_answers($registration) { // now update the answers foreach ($registration->answers() as $cache_key => $answer) { // verify object if ($answer instanceof EE_Answer) { if ($answer->ID()) { // make sure the cached answer is added to the model entity mapper $answer->get_model()->refresh_entity_map_with($answer->ID(), $answer); } } else { EE_Error::add_error(__('An invalid Answer object was discovered when attempting to update the model entity mapper.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); } } }