-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
42 lines (37 loc) · 924 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
34
35
36
37
38
39
40
41
42
<?php
/**
* Created by PhpStorm.
* User: igor
* Date: 14/07/18
* Time: 12:26
*/
require 'vendor/autoload.php';
use AW\Router;
use AW\Request as Request;
$router = new Router(new Request($_SERVER, $_POST, $_GET));
class Teste{
public function home(Request $request)
{
echo "eu {$request->show} com {$request->marombada}";
}
}
$router->get('/', function () {
echo 'start';
});
$router->get('/data', function () {
echo 'get data';
});
$router->post('/data', function (Request $request) {
echo 'post data';
});
$router->get('/datas/:var', function (Request $request) {
echo 'datas ' . $request->var;
});
$router->get('/date/:show', function (Request $request) {
echo 'date ' . $request->show;
});
$router->get('/data/:show/denovo', function (Request $request) {
echo 'show: ' . $request->show;
});
$router->get('/data/:show/denovo/:marombada', 'Teste@home');
$router->run();