Last active
August 29, 2015 14:18
-
-
Save gabriel403/edd610535fbb12c5da27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// request comes in to router | |
$request = new Request($_GET, $_POST, $_SERVER); | |
$controllerName = $request->someAwesomeFunctionToWorkOutController(); // Product for instance | |
$actionName = $request->someAwesomeFunctionToWorkOutAction(); // get/new/index/whatever | |
$controller = new $controller; | |
//enable notification caching | |
NotificationCache::enableNotificationCrap(); | |
$outputHtml = $controller->$actionName($request); | |
//by this point the whole request has been handled, all objects have been saved or changed or whatever | |
//so all we have to do to finish is process notifications and return html | |
NotificationCache::processCrap(); | |
echo $outputHtml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment