Esempio n. 1
0
$router->route('/:eventslug/pay/cancel', 'PublicSite\\BillingCancel');
$router->route('/:eventslug/share', 'PublicSite\\ShareByEmail');
$router->route('/bot/(?<command>feedback|now|next)', 'PublicSite\\Bot');
$router->route('/q', 'PublicSite\\Queue');
// Public tools
$router->route('/sign', 'Signage');
// Admin routes
$router->route('/admin', '/admin/people');
$router->route('/admin/people', 'Admin\\People');
$router->route('/admin/people/:id', 'Admin\\Person');
$router->route('/admin/people/new', 'Admin\\Person');
$router->route('/admin/panels', 'Admin\\Panels');
$router->route('/admin/invite', 'Admin\\Invite');
$router->route('/admin/rate', 'Admin\\Rate');
$router->route('/admin/badges', 'Admin\\Badges');
$router->route('/admin/exports/(?<export>panels|attendees)(?:\\.(?<format>csv|json))?', 'Admin\\Export');
// Shortcuts
$promotedevent = '/2015-london';
$router->route('/', $promotedevent);
$router->route('/register', $promotedevent . '/register');
$router->route('/faq(?:\\.html)', $promotedevent . '/faq');
$router->route('/hub', $promotedevent . '/hub');
$router->route('/feedback', 'https://docs.google.com/forms/d/1exJhCC0YjwPBh3qXf8BRNKSZ2kiY7XRGk_LLg_lhl3M/viewform');
$router->route('/errortest', 'ErrorTest');
$router->errorUnsupportedMethod('Errors\\Error405');
$router->errorNoRoute('Errors\\Error404');
$req = Routing\Request::createFromGlobals();
$resp = new Routing\Response();
$router->dispatch($req, $resp);
/* Serve the response */
$resp->serve();