-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
54 lines (38 loc) · 1.09 KB
/
index.php
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
require "./config.php";
//require "../php-database-class/db.class.php";
require "../php-friendly-urls-class/url.class.php"; // you can find this class in other repository
require "./RoutesClass.php";
$url = new URL($url);
$api = new ROUTE($url, $APIversion);
$api->define("/version/{{id}}/more", function ($api, $request) {
$api->join($request);
});
$api->define("/version/check/more", function ($api) {
$api->version();
});
$api->define("/version/", function ($api) {
$api->version();
});
$api->define("/version/check/more/this", function ($api) {
$api->version();
});
$api->define("/", function ($api) {
$api->version();
});
/*$api->define("/version", function ($api) {
$api->version();
});
$api->define("/login", function ($api, $request) {
$email = $request["email"];
});
$api->define("/login/check", function ($api) {
echo "ops";
});
$api->define("/login/{{id}}", function ($api) {
echo "opa, esse tem parametro";
});
$api->define("/", function ($api) {
});*/
$api->route($url->now(true));
$api->response('echo');