1<?php
2/**
3 * This is the Dokuwiki export for FINDOLOGIC.
4 * If any bugs occur, please submit a new issue
5 * @see https://github.com/findologic/dokuwiki-plugin-findologic-xml-export/issues/new
6 * @author Dominik Brader <support@findologic.com>
7 */
8require_once(__DIR__ . '/OutputXMLHelper.php');
9$outputXmlHelper = new OutputXMLHelper();
10// Get URL params
11$start = (int)$outputXmlHelper->getUrlParam($outputXmlHelper::START_NAME, $outputXmlHelper::DEFAULT_START_VALUE, $_GET);
12$count = (int)$outputXmlHelper->getUrlParam($outputXmlHelper::COUNT_NAME, $outputXmlHelper::DEFAULT_COUNT_VALUE, $_GET);
13// Check if params are valid and return the XML with the corresponding header
14if ($outputXmlHelper->paramsValid($start, $count, FILTER_VALIDATE_INT)) {
15    $outputXmlHelper->printXml($start, $count);
16} else {
17    $outputXmlHelper->throwError();
18}