-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrouter.php
17 lines (15 loc) · 870 Bytes
/
router.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
require_once "libs/Router.php";
require_once "controller/VehiculosController.php";
$router = new Router();
$router->addRoute('home', "GET", "VehiculosController", "home");
$router->addRoute('autos', "GET", "VehiculosController", "autos");
$router->addRoute('motos', "GET", "VehiculosController", "motos");
$router->addRoute('videojuegos', "GET", "VehiculosController", "videoJuegos");
$router->addRoute('luces', "GET", "VehiculosController", "luces");
$router->addRoute('aboutus', "GET", "VehiculosController", "aboutUs");
$router->addRoute('barcos', "GET", "VehiculosController", "barcos");
$router->addRoute('bicicletas', "GET", "VehiculosController", "bicicletas");
$router->addRoute('aeronaves', "GET", "VehiculosController", "aeronaves");
$router->setDefaultRoute("VehiculosController", "home");
$router->route($_GET['action'], $_SERVER['REQUEST_METHOD']);