-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (29 loc) · 750 Bytes
/
Copy pathindex.php
File metadata and controls
36 lines (29 loc) · 750 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
32
33
34
35
36
<?php
chdir(dirname(__DIR__));
define("OK", 200);
define("BAD_REQUEST", 400);
define("UNAUTHORIZED", 401);
define("FORBIDDEN", 403);
define("NOT_FOUND", 404);
define("INTERNAL_SERVER_ERROR", 500);
require_once('vendor/autoload.php');
require 'database/dbHandler.php';
use Zend\Config\Factory;
/*Configuration values*/
$config = Factory::fromFile('Restaurant-API/config/config.php', true);
$app = new \Slim\App;
function handleError($message, $type, $code){
return [
'error' => [
'message' => $message,
'type' => $type,
'code' => $code
],
];
}
require_once 'user.php';
require_once 'menu.php';
require_once 'status.php';
require_once 'take.php';
require_once 'give.php';
$app->run();