-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndex.php
33 lines (25 loc) · 880 Bytes
/
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
<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: OPTIONS,GET,POST,PUT,DELETE");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
include_once(__DIR__ . '/Controller.php');
class PhpApi{
private $PhpController;
function __construct(){
$this->PhpController = new PhpController();
}
function returnAllRecord(){
return $this->PhpController->_returnAllRecored();
}
function returnFirstRecored(){
return $this->PhpController->_returnFirstRecored();
}
function returnNumberOfRecord(){
return $this->PhpController->_returnNumberOfRecord();
}
}
$result = new PhpApi($_GET, $_POST);
$result->{$_GET['url']}();
?>