Exemple #1
0
$registry->set('weight', new Weight($registry));
// Length
$registry->set('length', new Length($registry));
// Cart
$registry->set('cart', new Cart($registry));
// Front Controller
$controller = new Front($registry);
// Rewrite
$rewrite = new Rewrite($registry);
$url->addRewrite($rewrite);
// Runtimer
$timer = new Runtime($registry);
$timer->start();
// Maintenance Mode
$controller->addPreAction(new Action('common/maintenance'));
// SEO URL's
$controller->addPreAction(new Action('common/seo_url'));
// RESTFUL URL's
//$controller->addPreAction(new Action('common/reset'));
// Router
if (isset($request->get['route'])) {
    $action = new Action($request->get['route']);
} else {
    $action = new Action('common/home');
}
// Dispatch
$controller->dispatch($action, new Action('error/not_found'));
$timer->stop();
$log->log_time($timer->spent());
// Output
$response->output();