Пример #1
0
$firstResults = array();
$endpoints = array();
$endpoints['local'] = new Endpoint($conf['endpoint']['local'], $conf['endpointParams']['config']);
$acceptContentType = Utils::getBestContentType($_SERVER['HTTP_ACCEPT']);
$extension = Utils::getExtension($acceptContentType);
//Check content type is supported by LODSPeaKr
if ($acceptContentType == NULL) {
    HTTPStatus::send406($uri);
}
//Export
if ($conf['export'] && $_GET['q'] == 'export') {
    include_once 'settings.inc.php';
    include_once 'classes/Exporter.php';
    $exp = new Exporter();
    header('Content-Type: text/plain');
    $exp->run();
    exit(0);
}
//Redirect to root URL if necessary
$uri = $conf['basedir'] . $_GET['q'];
$localUri = $uri;
if ($uri == $conf['basedir']) {
    header('Location: ' . $conf['root']);
    exit(0);
}
//Configure external URIs if necessary
$localUri = $conf['basedir'] . $_GET['q'];
$uri = Utils::getMirroredUri($localUri);
//Modules
foreach ($conf['modules']['available'] as $i) {
    $className = $i . 'Module';