PHP Classes

File: examples/fullexample/router.php

Recommend this page to a friend!
  Classes of Jorge Castro   PHP Route One   examples/fullexample/router.php   Download  
File: examples/fullexample/router.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Route One
Parse request URLs and route to a controller
Author: By
Last change:
Date: 4 years ago
Size: 494 bytes
 

Contents

Class file image Download
<?php

use eftec\routeone\RouteOne;

include
"../../vendor/autoload.php";
include
"BootstrapUtil.php";
include
"./controller/CustomerController.php";
include
"./controller/HomeController.php";
$route=new RouteOne(".",null,false);
$route->setDefaultValues('Home','index'); // if controller or action is empty then it will use the default values
$route->fetch();




//$route->callObject('cocacola\controller\%sController');
$route->callObjectEx('cocacola\controller\{controller}Controller');