ringfinger/api/v1/index.php

16 lines
378 B
PHP

<?php
require '../../backend/classes/core/Autoloader.php';
$autoloader = new Autoloader('../../backend/cache/');
$session = new Session();
$router = new Router($_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD']);
if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {
$router->setRequestBody($_SERVER['HTTP_CONTENT_TYPE'], file_get_contents('php://input'));
}
$router->route();