More routing changes

This commit is contained in:
Mike Koch 2017-01-18 17:22:24 -05:00
parent 5e21877efc
commit d9000c12c7

View File

@ -5,10 +5,26 @@
//require_once(__DIR__ . '/core/common.php');
require(__DIR__ . '/../Link/src/Link.php');
function routeMe(){
echo 'I am routed';
class HomeController
{
function get($i){
echo 'You have got to home :) Val:' . intval($i);
}
function post(){
echo 'You have posted to home';
}
function put(){
echo 'You have put to home';
}
function delete(){
echo 'You have deleted the home :(';
}
}
Link::all( array(
'/test' => 'routeMe',
Link::all(array(
'/test/{i}' => 'HomeController',
));