public function callMappingForFormDataFromPost($form_data) { $elements = array(); foreach ($form_data as $element_index => $element) { if (!empty($element['element_mapping']) && !empty($element['element_required']) && $element['element_required'] === "true") { if (!empty($element['element_value'])) { $callable_name = MappingHelper::getHandler($element['element_mapping']); if ($callable_name[0] == $element['element_mapping']) { if ($this->_callObjectFromCache($callable_name[0]) instanceof $callable_name[0]) { if (is_callable($callable_name, false, $real_callable_name)) { $element['element_mapping_value'] = call_user_func(array($this->_callObjectFromCache($callable_name[0]), $callable_name[1]), $element['element_value']); } } } } else { $element['element_required_message'] = 'Required Field Missing!'; } } $elements[$element_index] = $element; } return $elements; }