QARunnerLimitMode::main, 'minimaldatensatz' => QARunnerLimitMode::minimaldatensatz, 'count_vocabulary_entries_to_be_added' => QARunnerLimitMode::count_new_vocab_entries, }; $runner = new QARunner($lang, $parser, $data, $limitMode); header('Content-Type: application/json; charset=utf-8'); echo json_encode([ 'results' => match($subject) { 'object' => $runner->evaluateObjects(), 'minimaldatensatz' => $runner->evaluateObjectsForMinimaldatensatz(), 'count_vocabulary_entries_to_be_added' => $runner->countNewlyRequestedVocabularyEntries(), }, ]); } else if ($verb === 'convert_to_xml' && in_array($subject, QaConvertToXml::listAvailableOutputFormats(), true)) { $institution_name = MD_STD_IN::get_http_input_text("institution_name"); $institution_identifier = MD_STD_IN::get_http_input_text("institution_identifier"); $runner = new QARunner($lang, $parser, $data, null); // TODO: Add limit modes per format header('Content-Type: text/xml; charset=utf-8'); echo $runner->convertToXml($subject, $institution_name, $institution_identifier); }