Source for file IndexController.php
Documentation is available at IndexController.php
* DotBoost Technologies Inc.
* DotKernel Application Framework
* @copyright Copyright (c) 2009 DotBoost Technologies (http://www.dotboost.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @version $Id: IndexController.php 158 2010-06-25 08:59:20Z teo $
* Frontend Module - Index Controller
* Is doing all the job for specific frontend control stuff
* @author DotKernel Team <team@dotkernel.com>
// set Module and Action default values
$defaultController = $resource->route->controller->$requestModule;
$requestController = isset ($requestController) && $requestController != 'Index' ? $requestController : $defaultController;
$defaultAction = $resource->route->action->$requestModule->$requestController;
$requestAction = isset ($requestAction) && $requestAction != '' ? $requestAction : $defaultAction;
// start the template object, empty for the moment
require (DOTKERNEL_PATH . '/' . $requestModule . '/' . 'View.php');
$tpl->init($requestModule, $requestController, $requestAction);
// assign Index Template file
// set paths in templates
$tpl->setViewPaths($config);
* each Controller must load its own specific models and views
* Load option(specific configuration file for current dot) file
* @todo linking N dots together
$registry->option = $option;
* Start the variable for Page Title, this will be used as H1 tag too
$pageTitle = 'Overwrite Me Please !';
* From this point , the control is taken by the Action specific controller
* call the Action specific file, but check first if exists
$actionControllerPath = CONTROLLERS_PATH . '/' . $requestModule . '/' . $requestController . 'Controller.php';
!file_exists($actionControllerPath) ? $dotKernel->pageNotFound() : require ($actionControllerPath);
$tpl->setViewMenu($config);
// set SEO html tags from dots/seo.xml file
$tpl->setSeoValues($pageTitle);
// dispaly message (error, warning, info)
// parse the main content block
$tpl->parse('MAIN_CONTENT', 'tpl_main');
if(TRUE == $config->settings->frontend->debugbar)
$debug->startTimer = $startTime;
// parse and print the output
$tpl->pparse('OUTPUT', 'tpl_index');
|