<?php // index.php $executionTimers['wooof_1'][0] = microtime(true); require_once '../setup.inc.php'; $wo = new WOOOF(true, null, null, false); if (!$wo->constructedOk) { $wo->handleShowStopperError("1000 Failed to init WOOOF."); } wooofTimerStop('wooof_1'); $router = new AltoRouter(); $router->setBasePath(substr($wo->getConfigurationFor('siteBaseURL') . $wo->getConfigurationFor('publicSite'), 0, -1)); /*******************************************************************/ // the start/home // $router->map('GET', '/', function () use($wo) { VO_CtrlSite::home($wo); }, 'home'); require_once 'routes/movies.php'; require_once 'routes/profile.php'; require_once 'routes/registration.php'; require_once 'routes/evaluations.php'; /* ========================================================================== */ // Find and follow route based on URL // Handling of no matches, etc. inside the 'run' function. $router->run($wo); /* End of file index.php */
$router->get('GET', '/', function() use($app) { $subRequest = Request::create('/form', 'GET'); return $app->handle($subRequest, HttpKernelInterface::SUB_REQUEST); }); */ /* echo $router->generate('viewApp', array('appId' => 'fgder4rer', 'reason' => 'someAction') ); //die(); */ /* $router->map('GET|POST','/', 'home#index', 'home'); $router->map('GET','/users/', array('c' => 'UserController', 'a' => 'ListAction')); $router->map('GET','/users/[i:id]', 'users#show', 'users_show'); $router->map('POST','/users/[i:id]/[delete|update:action]', 'usersController#doAction', 'users_do'); */ $router->run(); ?> <!-- <h1>AltoRouter</h1> <h3>Current request: </h3> <pre> Target: <?php //var_dump($match['target']); ?> Params: <?php //var_dump($match['params']); ?> Name: <?php //var_dump($match['name']);