Exemplo n.º 1
0
}
dispatch_post('/auth', 'auth');
dispatch('/', 'index');
dispatch('/mine', 'mine');
dispatch_post('/order', 'post_order');
dispatch_post('/order/:id', 'post_order_action');
dispatch('/deposit', 'deposit');
dispatch_post('/deposit', 'post_deposit');
$route = run();
set('route', $route);
switch ($route['callback']) {
    case 'index':
        route_index(null);
        break;
    case 'mine':
        route_index(true);
        break;
    case 'post_order':
        route_post_order();
        break;
    case 'post_order_action':
        route_post_order_action($route['params']['id']);
        break;
    case 'auth':
        route_auth();
        break;
    case 'deposit':
        route_deposit();
        break;
    case 'post_deposit':
        route_post_deposit();
Exemplo n.º 2
0
<?php

route_not_found('TestApp.Controller.Error@404');
route_index('TestApp.Controller.Home@Default');
route('simple', '/say_hello/fsrger/ge/ge/g/erg/erg/<a@email>/ger/v/e/<b@int>/gver/<c@ip>/ver/v', function ($a, $b, $c) {
    print "Wow! ({$a}) ({$b}) ({$c})!";
});
route_get('test', '/this_it/<name>', function ($name) {
    print $name;
});
route_get('homeme', '/homeme/<id@int>', 'TestApp.Controller.Home@HomeMe');
route('default', '/<controller>/<action>', 'TestApp.Controller.#{controller}@#{action}');