public static function getInput($inputInfo, $type = 'text') { if (method_exists('FormInput', $type) && FormInput::validateInputInfo($inputInfo)) { return call_user_func(array('FormInput', $type), $inputInfo); } else { throw new Exception("Bad parameters."); } }