<?php /** * index.php * Index entrance * @version 151024:1 * @author karminski <*****@*****.**> */ define('PROCESS_NAME', 'index'); define('DEBUG', false); // controller require dirname(__FILE__) . '/protected/controller/BaseController.php'; require dirname(__FILE__) . '/protected/controller/IndexController.php'; $IndexController = new IndexController(); $IndexController->run();
{ /** * PageTemplate object used to render page * @access protected * @var PageTemplate */ protected $template; /** * Constructor. Create instance of PageTemplate using default index_tpl.php file * @access public */ public function __construct() { $this->template = new PageTemplate(); } /** * Run method with main page logic * * Only read in session data. Populate template and display index page. * @access public */ public function run() { $session = Session::getInstance(); $user = $session->getUser(); $this->template->render(array("title" => "Index", "user" => $user, "session" => $session)); } } $controller = new IndexController(); $controller->run();