-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
31 lines (23 loc) · 691 Bytes
/
index.php
File metadata and controls
31 lines (23 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* @index.php
* Handles all incoming requests and dishes out the responsibility to the various controllers.
*
*/
// load the Rest class
require_once("includes/config.php");
require_once("includes/View.php");
require_once("includes/Rest.php");
// record the startTime
$startTime = microtime(true);
// check config is loaded
if(!$config['is_loaded']) {
//Rest::sendJsonResponse(false,"Configuration not found",false,Rest::HTTP_INTERNAL_SERVER_ERROR);
View::render503();
exit;
}
// process the incoming HTTP request
$req = Rest::processRequest();
// parse the controller config, looking for a match
$req->delegate();
?>