Simple PHP router with closures
Posted on October 25, 2010
function display($somevar) {
$routes = array(
“ix” => function() { return HomeController::outFrontLayout();},
“re” => function() use($somevar) { return RegisterController::outManageUsers($somevar); }
);
return $routes[$pageName]();
}
Filed Under Uncategorized | Leave a Comment
Posted on October 16, 2010
Filed Under Uncategorized | Leave a Comment
