All pastes #196017 Raw Edit

pilgrim

public php v1 · immutable
·published 2006-10-10 07:30 UTC
rendered paste body
$registry = Registry::getInstance();$registry->set('application', new Application(dirname(__FILE__)));$registry->set('site', new Site);foreach ( Registry::getInstance()->get('application')->routes as $route ) {    if ( FALSE !== $route->parse($_SERVER['REQUEST_URI']) ) break;}if ( FALSE === $route->data ) die('Route not found.');if ( $_SERVER['REQUEST_URI'] != ( $actualUri = $route->build($route->data) ) ) {    header('Location: '.$actualUri);    exit;}$registry->set('route', $route);