/** * Process everything the queue */ public static function processQueue() { if (!count(self::$queue)) { return false; } $next = FabriqStack::dequeue(); while ($next->controller == '') { if (!count(self::$queue)) { return false; } FabriqStack::processQueue(); } self::$processing = $next; switch ($next->type) { case 'module': $module =& FabriqModules::module($next->controller); call_user_func_array(array($module, $next->action), $next->extra); if (Fabriq::render() != 'none' && FabriqModules::has_permission() && !FabriqModules::stopMappedRender()) { FabriqTemplates::renderToBody($next); } break; case 'controller': default: PathMap::controller($next->controller); PathMap::action($next->action); $file = "app/controllers/{$next->controller}.controller.php"; if (file_exists('sites/' . FabriqStack::site() . "/{$file}")) { require_once 'sites/' . FabriqStack::site() . "/{$file}"; } else { require_once $file; } $c = "{$next->controller}_controller"; $controller = new $c(); $a = str_replace('.', '_', $next->action); if (!$controller->hasMethod($a)) { FabriqStack::error(404); } call_user_func(array($controller, $a)); FabriqTemplates::renderToBody($next); break; } if (count(self::$queue)) { FabriqStack::processQueue(); } }
<header> <section id="header"> <img src="http://fabriqframework.com/public/images/Fabriqx60.png" title="Fabriq Framework" id="fabriq-icon" alt="F" style="margin: 5px; float: left;" /> <div id="site-name">Fabriq - <?php if (PathMap::action() == 'install') { echo 'Install'; } else { echo 'Update'; } ?> </div> </section> </header> <?php if (PathMap::action() == 'install') { ?> <nav id="default-nav"> <section class="nav"> <ul> <li<?php if (PathMap::arg(2) == 1) { echo ' class="current"'; } ?> >Start</li> <li<?php if (PathMap::arg(2) == 2) { echo ' class="current"'; }